Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.3.0/knockout-min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  
  
  <p>
    In Firefox, the first click event is lost if resize:vertical is set on the :focus CSS property</P><p>Instead it only fires once the textarea has focus</P>
  
  <textarea onclick="alert('clicked')"></textarea>
<p>An INPUT works fine, however</p>
<input onclick="alert('clicked')"/>
  
  
</body>
</html>
 
textarea:focus {
  /* This css property causes the click event to be lost */
  
   resize:vertical;  
  
}
 
/// TEST
// Click on the textarea
// You should see 'clicked' in the Console when you click once.
// But it only works in FF if you click again after it has taken focus.
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers