navigator.clipboard.read is not working if dom.events.testing.asyncClipboard is false
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, enhancement)
Tracking
()
People
(Reporter: vissu_nbkr, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.83 MB,
image/gif
|
Details |
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.
![]() |
||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 1•3 years ago
•
|
||
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.
![]() |
||
Updated•3 years ago
|
Description
•