WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
Bug 153887
iOS "clickable elements" concept/restriction not compatible with UI Events spec
https://bugs.webkit.org/show_bug.cgi?id=153887
Summary
iOS "clickable elements" concept/restriction not compatible with UI Events spec
Chris Rebert
Reported
2016-02-04 12:55:13 PST
I presume there must be some existing "Why isn't my <div> clickable?" bug of which this will be a duplicate, but my search-fu wasn't able to turn up anything and there's now an actual web-platform-test for this, so...
https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
states that elements only fire `click` events in certain circumstances (e.g. is a <button>, has an `onclick`, is styled as `cursor: pointer;`, etc.). However, the W3C spec that defines the `click` event doesn't place any such special preconditions on which elements fire `click` events. Quoting from relevant portions of the spec:
https://www.w3.org/TR/uievents/#event-type-click
> The click event type must be dispatched on the topmost event target indicated by the pointer, > when the user presses down and releases the primary pointer button, > or otherwise activates the pointer in a manner that simulates such an action.
https://www.w3.org/TR/uievents/#glossary-topmost-event-target
> topmost event target > The *topmost event target* must be the element highest in the rendering order which is capable of being an event target. > In graphical user interfaces this is the element under the user's pointing device. [...]
Attachments
Add attachment
proposed patch, testcase, etc.
Chris Rebert
Comment 1
2016-02-04 12:56:49 PST
Set the URL field to the relevant web-platform-test.
Lucas Forschler
Comment 2
2019-02-06 09:19:02 PST
Mass move bugs into the DOM component.
Ahmad Saleem
Comment 3
2023-07-13 04:47:43 PDT
Safari 16.5.1 also passes this test:
https://wpt.fyi/results/uievents/order-of-events/mouse-events/click-on-div.html?label=master&label=experimental&aligned&q=mouse-events%2Fclick-on-div.html
From linked in URL Field. can we mark this as “RESOLVED CONFIGURATION CHANGED”?
Anne van Kesteren
Comment 4
2023-07-15 11:26:20 PDT
Yes!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug