Bug 219533 - OnPaste does not fire for focused table cell
Summary: OnPaste does not fire for focused table cell
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: Safari 13
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-04 00:28 PST by Jimmy Thomsen
Modified: 2020-12-06 11:23 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jimmy Thomsen 2020-12-04 00:28:30 PST
Steps to reproduce the problem:
1. Visit https://jsfiddle.net/uzkv4spr/2/
2. Try pasting something in the div element (works)
3. Try pasting something in the table cell (doesn't work)

What is the expected behavior?
That OnPaste fires so I can access the clipboard data.
Currently I'm detecting CMD/CTRL + V in an OnKeyDown handler, but not all browsers allow access to the clipboard data outside of the OnPaste event (Firefox specifically), and obviously this solution does not work with the browser's context menu and Edit menu.

What went wrong?
OnPaste does not fire for table cell.

Did this work before? No 

Does this work in other browsers?: No
 The problem was reproduced in the following browsers.
 - Firefox 82.0.2 and 83
 - Safari 13.1.1
 - Chrome 87.0.4280.67
 - Chrome Canary 89.0.4344.0

I did not test IE, IEEdge, or ChromiumEdge.

The bug has been reported to the Chromium and Mozilla teams as well:
https://bugs.chromium.org/p/chromium/issues/detail?id=1155461
https://bugzilla.mozilla.org/show_bug.cgi?id=1680693
Comment 1 Jimmy Thomsen 2020-12-06 11:23:07 PST
Oh my - this is embarrassing..
Obviously I never attached an OnPaste listener to the table cell, which is why it didn't work. Please ignore this bug report. OnPaste for table cells works fine: https://jsfiddle.net/j7s5v2pn/1/

 - Sorry!