Closed Bug 332635 Opened 19 years ago Closed 17 years ago

consider implementing backspace/delete on collapsed selection in terms of select-and-delete

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: dbaron, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I think we should consider implementing backspace and delete when the selection is collapsed in terms of select-a-character (although not to the X selection!) and then delete the selection. This is because as we fix more and more i18n bugs, such as bug 237585 (and there are more!), it would be better not to have to duplicate all the grapheme cluster logic between the two operations.
(In reply to comment #0) > I think we should consider implementing backspace and delete when the selection > is collapsed in terms of select-a-character (although not to the X selection!) > and then delete the selection. This is because as we fix more and more i18n > bugs, such as bug 237585 (and there are more!), it would be better not to have > to duplicate all the grapheme cluster logic between the two operations. > As you were considering this, I was at the same time trying to implement such behavior using DOM, not for the same reason, it's true, but to circumvent another bug at that time: bug 322207 If you do this, please at least make sure that the selected character can be deleted, as enforced by a CSS rule: -moz-user-modify: read-only; or -moz-user-select: none; or -moz-user-focus: none; Make sure that the new selection obeys these CSS rules. But this is another bug: bug 237964.
QA Contact: editor
Assignee: mozeditor → nobody
The current implementation for DELETE/BACKSPACE inside and contentEditable element needs improvement. There are some issues regarding the selection and what should be deleted in certain "edge" cases. Check the attachment for samples.
Flags: blocking1.9?
Reported bug 414526 with some testcases on the BACKSPACE/DELETE behavior: - attachment 299981 [details] - attachment 299983 [details] - attachment 299984 [details] - attachment 299992 [details]
I just r+ed a patch in bug 157546 that fixes this for "delete". Comments in that bug suggest that backspace should actually not delete a cluster at a time. Users expect backspace to undo the last character they typed, so if they type a base character and a combining mark, backspace should just delete the combining mark. So I think after 157546 is fixed, this bug becomes partially FIXED and partially WONTFIX.
Depends on: 157546
Comments #2 and #3 are about a different issue, which seems to be adequately covered by bug 414526.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: