Closed Bug 1769678 Opened 3 years ago Closed 3 years ago

navigator.clipboard.read is not working if dom.events.testing.asyncClipboard is false

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, enhancement)

Firefox 100
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1773477

People

(Reporter: vissu_nbkr, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Safari/605.1.15

Steps to reproduce:

I tried to read clipboard by using the navigator.clipboard.read API by setting the dom.events.asyncClipboard.clipboardItem and dom.events.asyncClipboard.read to true from about:config in firefox.

Actual results:

An error is thrown with undefined error message.

If we set the config dom.events.testing.asyncClipboard also to true it is working.

Expected results:

As the name suggests I thought no need to set dom.events.testing.asyncClipboard to true, but clipboard API is not able read without setting this config.

Component: Untriaged → DOM: Events
Product: Firefox → Core
Component: DOM: Events → DOM: Copy & Paste and Drag & Drop

I think it is because we still use the permission model for clipboard.read() which only works for addon, https://searchfox.org/mozilla-central/rev/24c1cdc33ccce692612276cd0d3e9a44f6c22fd3/dom/events/Clipboard.cpp#59-61. We are working on a new model that show a paste button instead in bug 1744524. clipboard.read() will be applied to the same model.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: