<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>305626</bug_id>
          
          <creation_ts>2026-01-15 22:41:36 -0800</creation_ts>
          <short_desc>Touch on a button affects onmouseover event after original button replaced.</short_desc>
          <delta_ts>2026-02-02 10:48:10 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</component>
          <version>Safari 26</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>visionOS 26</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>304955</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>michael</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>a_protyasha</cc>
    
    <cc>karlcow</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2172433</commentid>
    <comment_count>0</comment_count>
    <who name="">michael</who>
    <bug_when>2026-01-15 22:41:36 -0800</bug_when>
    <thetext>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(&apos;touchstart&apos;, blockClicks, true);
document.addEventListener(&apos;touchend&apos;, blockClicks, true);
document.addEventListener(&apos;pointerdown&apos;, blockClicks, true);
document.addEventListener(&apos;pointerup&apos;, blockClicks, true);
document.addEventListener(&apos;onmouseover&apos;, 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&apos;s text changed to &quot;button 2 moused over&quot;

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172435</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-01-15 22:54:30 -0800</bug_when>
    <thetext>*** Safari Technology Preview 235 ***

Button 2 appear and then if you hover on button 2, it changes text to &quot;button 2 moused over&quot;.

*** 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172436</commentid>
    <comment_count>2</comment_count>
      <attachid>478041</attachid>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-01-15 22:57:19 -0800</bug_when>
    <thetext>Created attachment 478041
Test Case (same as link)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172667</commentid>
    <comment_count>3</comment_count>
    <who name="">michael</who>
    <bug_when>2026-01-16 16:58:52 -0800</bug_when>
    <thetext>My apologies for the update. While it is not in the test code, if (referenced in the original post) 

document.addEventListener(&apos;onmouseover&apos;, blockClicks, true);
is corrected to
document.addEventListener(&apos;mouseover&apos;, 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2174378</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-01-22 22:42:11 -0800</bug_when>
    <thetext>&lt;rdar://problem/168737347&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2177223</commentid>
    <comment_count>5</comment_count>
    <who name="Abrar Rahman Protyasha">a_protyasha</who>
    <bug_when>2026-02-02 10:48:10 -0800</bug_when>
    <thetext>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 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>478041</attachid>
            <date>2026-01-15 22:57:19 -0800</date>
            <delta_ts>2026-01-15 22:57:19 -0800</delta_ts>
            <desc>Test Case (same as link)</desc>
            <filename>Test_Case_305626.html</filename>
            <type>text/html</type>
            <size>889</size>
            <attacher name="Ahmad Saleem">ahmad.saleem792</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CiAgICA8bWV0YSBjaGFyc2V0
PSJVVEYtOCI+CiAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNl
LXdpZHRoLCBpbml0aWFsLXNjYWxlPTEuMCI+CiAgICA8dGl0bGU+VGVzdDwvdGl0bGU+CgogICAg
PC9oZWFkPgogICAgPGJvZHk+CgoKPGgyPkdob3N0IGNsaWNrPC9oMj4KPGRpdiBzdHlsZT0iaGVp
Z2h0OjEwMHB4IiBpZD0idGVzdF9vbmUyIj4KCTxidXR0b24gdHlwZT0iYnV0dG9uIiBvbmNsaWNr
PSJjb25zb2xlLmxvZygnYn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