Open Bug 1408641 Opened 7 years ago Updated 2 years ago

execCommand('paste') not working

Categories

(WebExtensions :: General, defect, P3)

56 Branch
defect

Tracking

(firefox57 wontfix)

UNCONFIRMED
Tracking Status
firefox57 --- wontfix

People

(Reporter: aaron_irvdel, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20171002220106

Steps to reproduce:

(This was first mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1340578 and is raised here as a new bug)

For a webextension with "clipboardRead" (and "clipboardWrite") in the manifest file, in its content script, run document.execCommand("paste").

(An example webextension of this is abctajpu2 which pastes fine in Firefox 56 and in Chrome, but not in Firefox 57b6 nor 57b8)


Actual results:

The clipboard contents should have been pasted into the active input field of the content web page (and the function should return true).


Expected results:

The clipboard contents are not pasted (although the function does return true).
I now notice that sometimes the document.execCommand("paste") does succeed, suggesting the issue may be related to timing. Maybe the content script (that does the document.execCommand("paste")) runs just before the contents page has properly refocused (after the webextension's popup closes).
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
As 1272869 talks about the background page, I don't think it's the underlying issue.  With this current issue a user action causes a message to be sent to the content script which attempts to run the document.execCommand("paste").
Priority: -- → P3
Product: Toolkit → WebExtensions
Severity: normal → S3

Have you fixed this issue. As we are using the same browser. But we couldn't copy and paste the content of https://www.accntex.com/services/payroll/ as our expert tried alot about it but not finding the solution. If you have found any solution so kindly share with us so that we could fix the issue and progress our solution. Really getting demotivated about the browser.

You need to log in before you can comment on or make changes to this bug.