execCommand("SelectAll") doesn't seem to work if not in an editor.
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: emilio, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Other browsers seem to select the non-editable content, just like if you pressed Ctrl+A. Masayuki is this known / intended?
This causes testing/web-platform/tests/inert/inert-node-is-unselectable.tentative.html
to fail.
Assignee | ||
Comment 1•3 years ago
|
||
It's just our traditional behavior. We should follow the other browsers.
Assignee | ||
Comment 2•3 years ago
|
||
This causes
testing/web-platform/tests/inert/inert-node-is-unselectable.tentative.html
to fail.
Unfortunately, not supporting execCommand("selectall")
in non-editable document is not the only cause of the fail. With fixed build, it keeps failing with this assertion:
assert_equals: expected "I'm selectable." but got "\r\nI'm selectable.\r\n"
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
When document.execCommand("selectall")
is called, it should behave exactly
same as "Select All" in the UI for compatibility with the other browsers.
And also this patch fixes a bug of the WPT. selectionchange
event should
be fired, but asynchronously. Therefore, Chrome also fails the check.
Reporter | ||
Comment 4•3 years ago
|
||
Ah, thanks for the heads-up, we should probably just call trim()
in the test or such. Thanks for the super-quick answer/fix!
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/2c112a607a2b Make `Document::ExecCommand` not stop handling `selectall` command when there is no editable content r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28590 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Comment 8•3 years ago
|
||
bugherder |
Description
•