Bug 9553 - Pasting in a text input doesn't trigger onKeyUp, onPaste
Summary: Pasting in a text input doesn't trigger onKeyUp, onPaste
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-23 01:12 PDT by Duncan Wilcox
Modified: 2022-07-19 11:32 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Wilcox 2006-06-23 01:12:27 PDT
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.
Comment 1 Ahmad Saleem 2022-07-19 11:10:37 PDT
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!
Comment 2 Ryosuke Niwa 2022-07-19 11:32:26 PDT
Thanks for testing.