Closed Bug 1334653 Opened 8 years ago Closed 8 years ago

document.execCommand denied from background

Categories

(WebExtensions :: Untriaged, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1197451

People

(Reporter: ianbicking, Unassigned)

Details

I have this code running in a background WebExtension page (this works in Chrome): let el = document.createElement("textarea"); document.body.appendChild(el); el.value = text; el.select(); document.execCommand("copy"); document.body.removeChild(el); In Firefox this gives the error "document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler." Version: 52.0a2 (2017-01-23) (64-bit)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.