[Webkit-unassigned] [Bug 219599] New: OnPaste only fires if element is clicked

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 7 06:16:36 PST 2020


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

            Bug ID: 219599
           Summary: OnPaste only fires if element is clicked
           Product: WebKit
           Version: Safari 13
          Hardware: Macintosh
                OS: macOS 10.13
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: UI Events
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jimmy at codemagic.dk

Steps to reproduce the problem (copied from https://bugs.chromium.org/p/chromium/issues/detail?id=1156117):

1. Go to https://jsfiddle.net/62z9uwq1/
2. Follow the reproduction steps in the JSFiddle

AND..

This bug basically makes the combination of tabIndex + onPaste in popular frameworks such as ReactJS useless, as events are intercepted at the document level and dispatched to the appropriate element based on the event argument's target property.

A) Go to https://codesandbox.io/s/react-playground-forked-9juxn?file=/index.js
B) Click in "Table cell 1" and press CTRL + V: it works!
C) Press TAB to jump to "Table cell 2" and press CTRL + V: Nothing happens, because the global OnPaste event handler configured by ReactJS never receives an OnPaste event with "Table Cell 2" as event target - only <body> is received.

It's probably safe to assume that many other frameworks are affected too.

What is the expected behavior?
OnPaste must fire for elements that gain focus programmatically or via TAB navigation.

What went wrong?
OnPaste does not fire - only if user clicked on the element first.

OnPaste fires properly in Firefox v. 83 and IEEdge 18.

Chrome 87 and ChromiumEdge 87 are also affected by this bug.

Other browsers such as IE and Opera not tested.

-- 
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/20201207/db2a45a8/attachment.htm>


More information about the webkit-unassigned mailing list