Deleting a word doesn't eliminate the space around it
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: edgar, Assigned: jjaschke)
References
Details
(Keywords: parity-chrome, parity-safari)
Attachments
(1 file, 1 obsolete file)
(filed from https://bugzilla.mozilla.org/show_bug.cgi?id=1779913#c7)
STR:
- Write "one two".
- Double click the word "one", then press delete.
Actual result:
The space between the words is not deleted in Firefox
Expected result:
Chrome and Safari deletes the space between the words.
Comment 1•3 years ago
|
||
On Mac, when I double click the word "one", the space between "one" and "two" isn't selected.
One Win11, the space is selected.
Hi Jan, would you like to take a look to see what's up in our code? Thanks.
Assignee | ||
Updated•3 years ago
|
Comment 2•3 years ago
|
||
If HTMLEditor
extends the deleting range, it will need to manage InputEvent.getTargetRange()
result too. Or the other browsers could be that they just forget to convert the white-space to NBSP. Investigate how they work for these things.
Comment 3•3 years ago
|
||
And also check the case white-space:pre
.
Assignee | ||
Comment 4•3 years ago
|
||
This is a WIP commit, currently only contains a test to reproduce the issue.
Reporter | ||
Comment 5•3 years ago
|
||
I tested comment #0 on Linux, Chrome doesn't deletes the space between the words.
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
Native behaviour on MacOS dictates one whitespace being removed after double-clicking a word and pressing delete.
This behaviour is achieved by saving the information that the selection is created by doubleclick to the nsFrameSelection
and using it in the DeleteRangeTransaction
, where the range is extended by one whitespace character before or after the range.
Updated•2 years ago
|
Comment 8•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•