Closed
Bug 1162952
Opened 10 years ago
Closed 10 years ago
Fix document.queryCommandEnabled('cut'/'copy') to return true always
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: nika)
References
(Depends on 2 open bugs)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 3 obsolete files)
9.10 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
We should probably return false for now for paste as opposed to throwing when IsEditingOnAfterFlush() returns false.
Comment 1•10 years ago
|
||
While you're looking at and thinking of this, comments on the (feas|desir)ability of https://github.com/w3c/clipboard-apis/issues/4 would be very welcome ;)
Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Hallvord R. M. Steen [:hallvors] from comment #1)
> While you're looking at and thinking of this, comments on the
> (feas|desir)ability of https://github.com/w3c/clipboard-apis/issues/4 would
> be very welcome ;)
See bug 596764. :-)
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8604214 -
Flags: review?(ehsan)
Assignee | ||
Comment 5•10 years ago
|
||
Acknowledge now-failing browserscope tests
Attachment #8604214 -
Attachment is obsolete: true
Attachment #8604214 -
Flags: review?(ehsan)
Attachment #8604327 -
Flags: review?(ehsan)
Reporter | ||
Comment 6•10 years ago
|
||
Comment on attachment 8604327 [details] [diff] [review]
Always return true from document.queryCommandEnabled('cut'/'copy')
Review of attachment 8604327 [details] [diff] [review]:
-----------------------------------------------------------------
::: editor/libeditor/tests/test_bug408231.html
@@ +25,2 @@
> ["createlink", "true"],
> + ["cut", "true"],
Can you please uncomment and fix the test for paste further down this array?
Attachment #8604327 -
Flags: review?(ehsan) → review+
Updated•10 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 7•10 years ago
|
||
Un-commented and fixed queryCommandEnabled() test for 'paste'.
The other tests for paste aren't fixed by this patch (they throw).
Attachment #8604327 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8605330 -
Flags: review?(ehsan)
Reporter | ||
Updated•10 years ago
|
Attachment #8605330 -
Flags: review?(ehsan) → review+
Comment 8•10 years ago
|
||
One moment.. did we consider returning "true" only in a thread that's user-triggered (i.e. allowed to open a popup) and "false" otherwise?
Flags: needinfo?(ehsan)
Reporter | ||
Comment 9•10 years ago
|
||
(In reply to Hallvord R. M. Steen [:hallvors] from comment #8)
> One moment.. did we consider returning "true" only in a thread that's
> user-triggered (i.e. allowed to open a popup) and "false" otherwise?
Oh, thanks for noticing this. Yes, we should definitely return false when we are not handling the user input. Michael, do you mind making that change, please?
Flags: needinfo?(ehsan)
Reporter | ||
Comment 10•10 years ago
|
||
Comment on attachment 8605330 [details] [diff] [review]
Always return true from document.queryCommandEnabled('cut'/'copy')
r- as per comment 9.
Attachment #8605330 -
Flags: review+ → review-
Comment 11•10 years ago
|
||
http://jsfiddle.net/213ov2ah/ tests queryCommandEnabled() for copy and cut - non-user-initiated and user-initiated.
Assignee | ||
Comment 12•10 years ago
|
||
New patch which now only returns true when in privileged or user-initiated code.
New try in progress: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8b6e1e3067e6
Attachment #8605330 -
Attachment is obsolete: true
Attachment #8610170 -
Flags: review?(ehsan)
Reporter | ||
Updated•10 years ago
|
Attachment #8610170 -
Flags: review?(ehsan) → review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 13•10 years ago
|
||
Keywords: checkin-needed
Comment 14•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Comment 16•10 years ago
|
||
Updated:
https://developer.mozilla.org/en-US/docs/Web/API/Document/queryCommandSupported
and
https://developer.mozilla.org/en-US/Firefox/Releases/41#Interfaces.2FAPIs.2FDOM
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•