WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 304955
305626
Touch on a button affects onmouseover event after original button replaced.
https://bugs.webkit.org/show_bug.cgi?id=305626
Summary
Touch on a button affects onmouseover event after original button replaced.
michael
Reported
2026-01-15 22:41:36 PST
Please use
https://www.renshuu.org/ghost_click.html
for testing this issue. Was not present in iOS 18.x, only in 26.2 (so far). There is a button on the above webpage with an onclick event. Tapping it will cause it to be hidden, with another button (same location) appearing 500ms later. The second button has a onmouseover attribute, which is somehow activated (presumably by the first tap). Changing the timeout between the disappearance of the first button and the appearance of the second button does not change anything (even for high values such as 2000ms). Although not included in the test code, attaching a ton of event watches after the timeout begins function blockClicks(e) { console.log(e); } document.addEventListener('touchstart', blockClicks, true); document.addEventListener('touchend', blockClicks, true); document.addEventListener('pointerdown', blockClicks, true); document.addEventListener('pointerup', blockClicks, true); document.addEventListener('onmouseover', blockClicks, true); will not register any additional events, leading me to think that is somehow an artifact of the first touch. Note: there is also an onclick attribute on the second button, but it is not triggered, even if the onmouseover is removed. Expected behavior: 1. Tap button one 2. It disappears, replaced with button 2 500ms later 3. No changes to the text in button 2 Actual behavior: 1. Tap button one 2. It disappears, replaced with button 2 500ms later 3. Button 2's text changed to "button 2 moused over" Please amend severity if needed. This lies on a critical pathway in my site/app, so it is major to me, but I can understand how it may not be the case with others.
Attachments
Test Case (same as link)
(889 bytes, text/html)
2026-01-15 22:57 PST
,
Ahmad Saleem
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2026-01-15 22:54:30 PST
*** Safari Technology Preview 235 *** Button 2 appear and then if you hover on button 2, it changes text to "button 2 moused over". *** Chrome Canary 146 *** Same as Safari Technology Preview 235. *** Firefox Nightly 149 *** Same as Safari Technology Preview 235. ______ Will test iOS and Android later and update.
Ahmad Saleem
Comment 2
2026-01-15 22:57:19 PST
Created
attachment 478041
[details]
Test Case (same as link)
michael
Comment 3
2026-01-16 16:58:52 PST
My apologies for the update. While it is not in the test code, if (referenced in the original post) document.addEventListener('onmouseover', blockClicks, true); is corrected to document.addEventListener('mouseover', blockClicks, true); And the event listener is active for a longer period of time than the period after the first button disappears (and the second button appears), it does seem to block the mouseover from being activated. A not-so-pretty hack that may resolve it in some cases, but the original issue still remains.
Radar WebKit Bug Importer
Comment 4
2026-01-22 22:42:11 PST
<
rdar://problem/168737347
>
Abrar Rahman Protyasha
Comment 5
2026-02-02 10:48:10 PST
Thank you for the report! This has been fixed in
webkit.org/b/304955
. *** This bug has been marked as a duplicate of
bug 304955
***
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