Bug 9553
Summary: | Pasting in a text input doesn't trigger onKeyUp, onPaste | ||
---|---|---|---|
Product: | WebKit | Reporter: | Duncan Wilcox <duncan> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, ian, oliver, rniwa |
Priority: | P2 | ||
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 |
Duncan Wilcox
Given a fragment like this: <input type="text" onkeyup="alert('keyup'); return true;">
Safari never triggers the alert when pasting; firefox 1.5.0.4 (tested on a mac) and ie6 (tested on a windows server 2003) trigger the alert only when pasting via cmd-v/ctrl-v keyboard accelerator, but not when pasting from the edit menu.
Additionally, both firefox and ie6 will trigger the alert when pasting either from keyboard or menu in the following: <input type="text" onpaste="alert('keyup'); return true;">. Safari never appears to trigger the onpaste alert.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
I changed the test case from Description into following fiddle:
Link - https://jsfiddle.net/stybxefj/show
Following is behavior across all browsers:
*** Safari 15.5 on macOS 12.4 ***
CMD+C / CMD+V - triggers an alert 'keyup'
Right click and "paste" - nothing (till I press Enter then it shows 'keyup')
From Edit "Paste" and still nothing
*** Firefox Nightly 104 ***
Matches with Safari
*** Chrome Canary 105 ***
Matches with Safari
__________
I am not clear on web-spec or expected results but from description, I was able to understand only these two cases and they are same across all browsers and I think other browsers aligned with Webkit behavior. I think this can be closed as "RESOLVED INVALID" or "RESOLVED WONTFIX" or if I am wrong then can be tested correctly. Thanks!
Ryosuke Niwa
Thanks for testing.