Closed Bug 1851949 Opened 1 year ago Closed 12 days ago

contenteditable="plaintext-only" changes selection behavior

Categories

(Core :: DOM: Selection, defect)

Firefox 116
defect

Tracking

()

RESOLVED FIXED
133 Branch

People

(Reporter: bsder, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0

Steps to reproduce:

I have a table with contenteditable="true". When I select a cell and then press "Ctrl-A" all the cells of the table get selected. This is what I consider to be correct behavior.

If, however, I use contenteditable="plaintext-only", I select a cell, press "Ctrl-A", and a bunch of stuff outside the table also becomes selected. I believe this is incorrect.

Note that Chrome does not behave like this.

Actual results:

More text than the table entries got selected.

Expected results:

Only table cell entries should have been selected.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Selection' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Selection
Product: Firefox → Core
Attached file testcase.html

Yeah I can repo, NI myself to take a look

Flags: needinfo?(sefeng)
Severity: -- → S3
Flags: needinfo?(sefeng)
Flags: needinfo?(sefeng)

This bug gets even weirder.

Even if you manually select the cells correctly, paste behavior still fails.

(In reply to Sean Feng [:sefeng] from comment #2)

Created attachment 9352052 [details]
testcase.html

Yeah I can repo, NI myself to take a look

https://bugzilla.mozilla.org/show_bug.cgi?id=1291467 is still open.

Setting the bug dependency, so when bug 1291467 is done, we remember to verify this.

Fixed in the Nightly channel.

Status: UNCONFIRMED → RESOLVED
Closed: 12 days ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Flags: needinfo?(sefeng)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: