Closed Bug 1043182 Opened 5 years ago Closed 5 years ago

IMEContentObserver::CharacterDataChanged() doesn't convert new lines in replaced and inserted text to native new lines

Categories

(Core :: User events and focus handling, defect)

x86_64
Windows 8.1
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: inputmethod)

Attachments

(1 file, 1 obsolete file)

No description provided.
Attached patch Patch (obsolete) — Splinter Review
Attached patch PatchSplinter Review
The patches of bug496360 causes broken behavior of ChangJie (Taiwan's IME).

0. Focus to textarea element.
1. Type a Chinese character and commit it.
2. Type Enter.
3. Type something.

Then, the new composition is inserted to the end of the first line, not the second line. This only occurs in textarea. Not reproduced in HTML editor.

The reason is, plain text editor doesn't use <br> for line breaks. The content is actually plain text with XP line breaks. However, IMEContentObserver::CharacterDataChanged() doesn't convert the new lines to native new lines at computing the mOldEnd and mNewEnd.

I'm not sure why ChangJie is broken by the patches. Although, this bug has already been there...
Attachment #8461408 - Attachment is obsolete: true
Attachment #8462395 - Flags: review?(bugs)
Attachment #8462395 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/2cb0971fc597
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.