[Webkit-unassigned] [Bug 203414] New: Changing DOM in "touchstart" event handler prevent "click" event propagation. New in Safari 13

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 25 07:46:22 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=203414

            Bug ID: 203414
           Summary: Changing DOM in "touchstart" event handler prevent
                    "click" event propagation. New in Safari 13
           Product: WebKit
           Version: Safari 13
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: UI Events
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: pavel at hypofriend.de

Created attachment 381918

  --> https://bugs.webkit.org/attachment.cgi?id=381918&action=review

Problem with new version of Safari

Hi,
we have built our hybrid application as an SPA. The recent release of Safari 13 made our website break.

In Safari 12 we have been able to get both events on the mobile device (touchstart and click) event when we created new element in DOM.
In Safari 13 we are not able to get click event after we touch DOM (creating new element prevent propagation).

Code example:

<html>
<head></head>
<body>
<a ontouchstart="console.log('touch');mutateDOM();" onclick="console.log('click');">Test</a>
<script>
  function mutateDOM() {
    var input = document.createElement('input');
        input.id = "test";
    document.body.appendChild(input);
  }
  document.addEventListener('click', function (event) {
    console.log('Got event!');
  }, true);
</script>
</body>
</html>

Result in Safari 12 on iOS 11.1:
- touch
- input generated
- click
- input is focused

Result in Safari 13 on iOS 13.0:
- touch
- input generated
X click is not fired
X input is not focused

CodePen for testing: https://codepen.io/pavel-jurasek-hypofriend-de/pen/LYYywxR

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191025/59f750f9/attachment-0001.htm>


More information about the webkit-unassigned mailing list