Closed Bug 1640883 Opened 5 years ago Closed 5 years ago

execCommand('copy') denied on CTRL-X and CTRL-C

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: edgar, Assigned: edgar)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

This is originally reported on https://github.com/eclipse-theia/theia/issues/7542.

It is because we don't treat the key event come with the modifier as a user activation, see https://searchfox.org/mozilla-central/rev/e9131060a0322f6c181b4933ac74e6440b6e723d/widget/TextEvents.h#320. But the Ctrl-x, Ctrl-C is a quite common shortcut for copying, I think we should allow it.

And the reason for ignoring key events with a modifier is mainly because we think the user might intend to interact with the browser at that time. We should have a better way to handle it instead of ignoring all combinations.

Blocks: 1577516

ctrl-c and ctrl-x is quite common shortcut for clipboard operation, we should
treat it as user activaion.

Attachment #9152064 - Attachment description: Bug 1640883 - Treat ctrl-c and ctrl-x as user activaion; → Bug 1640883 - Treat ctrl-c, ctrl-x and ctrl-v as user activation;

Is there a workaround for it?

Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aa89e2840bce Treat ctrl-c, ctrl-x and ctrl-v as user activation; r=smaug

(In reply to anton.kosyakov from comment #2)

Is there a workaround for it?

Unfortunately, there is no workaround for web content.

Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f2d2e86a99d0 Treat ctrl-c, ctrl-x and ctrl-v as user activation; r=smaug https://hg.mozilla.org/integration/autoland/rev/e7c7162dbee2 Update autoplay policy tests; r=alwu
Flags: needinfo?(echen)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: