If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

can't delete a composed character with single Delete keypress




11 years ago
11 months ago


(Reporter: Akira TAGOH, Unassigned)


Firefox Tracking Flags

(Not tracked)



(2 attachments)



11 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; ja; rv: Gecko/20060808 Fedora/ Firefox/ pango-text
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; ja; rv: Gecko/20060808 Fedora/ Firefox/ pango-text

A composed character that is used in such as Indic Languages, can't be deleted by single Delete key press. they are sequentially composed with the base consonant and some consonant conjuncts. deleting consonant conjunct with Backspace key is what we expected. that's ok. they can continue to type another one after that then.
However deleting a base consonant only with Delete key isn't what we expected. there isn't much point in keeping the consonant conjuncts themselves in the language aspect.

Reproducible: Always

Steps to Reproduce:
1.open sample.html
2.move the cursor to the top of line.
3.press Delete key.

Actual Results:  
the consonant conjuncts are still there.

Expected Results:  
the whole composed character should be deleted.

Comment 1

11 years ago
Created attachment 233988 [details]


11 years ago
Version: unspecified → 1.5.0.x Branch

Comment 2

11 years ago
Created attachment 234185 [details] [diff] [review]
proposed patch to fix this issue

attached a patch to solve this issue. can someone review this patch?

Comment 3

11 years ago
That patch also fixes the same problem on thunderbird. and it also works fine on midas.
Comment on attachment 234185 [details] [diff] [review]
proposed patch to fix this issue

Daniel, can you give this patch a look?  Thanks.
Attachment #234185 - Flags: review?(daniel)
Uri: since delete is always a logical operation, I'm fairly sure that the test for (caretBidiLevel & 1) in the patch is wrong. Would it be enough just to remove that, or does there need to be a new CharacterExtendForDelete() method in nsISelectionController similar to WordExtendForDelete() from bug 344226?
(In reply to comment #5)

Yes, a CharacterExtendForDelete() method would be necessary. (The test in the patch is wrong anyway, because the caret bidi level doesn't necessarily reflect the direction of the text it's on).

See aaronlev's original patches on bug 344423 (e.g. attachment 232268 [details] [diff] [review]) which added that method. I effectively shot down that idea then, because I was a bit scared of the implications, and because I believed that using the content (not the frames) was a better approach. I'm no longer sure about that.

Anyway, I think that using the content tree for backwards-deleting, but the frame tree for forward-deleting is a bad idea, which will likely cause unwanted inconsistencies (such as the treatment of collapsed whitespace and unrenderable control characters).

See also bug 332739.
Comment on attachment 234185 [details] [diff] [review]
proposed patch to fix this issue

canceling review based on comment 6
Attachment #234185 - Flags: review?(daniel)
Component: General → Editor
Product: Firefox → Core
QA Contact: general → editor
Version: 1.5.0.x Branch → unspecified

Comment 8

11 months ago
Confirmed on 52.
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.