In WebKit browsers (I tested Chrome and Safari on Mac), the button element behaves strangely:
Wen in this fiddle http://jsfiddle.net/5ReUn/3/ you do the following:
- Click the left mouse button when the cursor is over the HTML button text
- Move the cursor (when pressed) to the button area without text
- Release the mouse button
Then the click event on the button element does not fire!
HTML is very simple:
<button id="button">Click</button>
And CSS is not at all complicated:
button {
display: block;
padding: 20px;
}
JS for click capture:
button = document.getElementById('button');
button.addEventListener('click', function() {
console.log('click');
});
Many visitors to my site complain that the buttons are not available. They do not understand that they move the cursor when pressed.
Has anyone found a workaround for this?