RESOLVED WORKSFORME 14364
Elements with visibility:hidden can still receive "onmouseover" and "onclick" events
https://bugs.webkit.org/show_bug.cgi?id=14364
Summary Elements with visibility:hidden can still receive "onmouseover" and "onclick"...
Peter Snyder
Reported 2007-06-24 02:11:44 PDT
If I set an element with an "onmouseover" or an "onclick" event, and then set the element to be "visibility:hidden," webkit still triggers those events. For example, say I make a button out of a div, and register its onmouseover event to change the cursor to the pointer. Then I want to hide the button from the user with out affecting the page's layout, so I make the div "hidden." Webkit would still change the cursor to the pointer when I mouse over the empty spot on the page where the div "used to be" (in the eye of the user). As far as I can tell, the CSS specs are silent on what should happen here. Gecko doesn't seem to trigger events like "onmouseover" or "onclick" on hidden elements, which seems more intuitive and helpful. Webkit should probably do the same.
Attachments
testcase (837 bytes, text/html)
2013-03-04 23:11 PST, Matt Falkenhagen
no flags
Matt Falkenhagen
Comment 1 2013-03-04 23:11:46 PST
Created attachment 191408 [details] testcase
Matt Falkenhagen
Comment 2 2013-03-04 23:15:18 PST
This issue no longer seems to exist in the latest WebKit. I've attached a testcase and tested on a new Chromium build and Safari 6.0.2. The behavior is the same as Firefox and IE 9: the events are not fired when 'visibility' is 'hidden'. I also don't see if there is a spec about this but the browsers I tested agree.
Note You need to log in before you can comment on or make changes to this bug.