Closed Bug 1234152 Opened 9 years ago Closed 4 years ago

Alternative of nsClipboardCommand::IsCommandEnabled("copy"/"cut")

Categories

(Core :: DOM: Events, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: 543080122, Unassigned)

Details

> nsClipboardCommand::IsCommandEnabled now returns true unconditionally after Firefox 41 (bug 1012662, bug 1162952) My script depends on the return value of `nsClipboardCommand::IsCommandEnabled` no longer works, can I find any alternative solution to it? Code snippet: > try { > var controller = top.document.commandDispatcher.getControllerForCommand(aCommand); > if (controller && controller.isCommandEnabled(aCommand)){ > controller.doCommand(aCommand); > } else { > DoSomethingIfItsNotAvailable(); > } > } catch (e) { }

If there's a need for this that should probably be standardized first, e.g., at https://github.com/w3c/clipboard-apis/issues.

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