Closed Bug 1940620 Opened 1 month ago Closed 1 month ago

The trealing white-space disappears at typing text after IME composition started after a trailing white-space but canceled

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox134 --- unaffected
firefox135 --- fixed
firefox136 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Regression)

Details

(Keywords: inputmethod, regression)

Attachments

(2 files)

STR

  1. Go to https://d-toybox.com/studio/lib/input_event_viewer.html?editor=contenteditable&innerHTML=%3Cp%3Eabc+%5B%5D%3Cbr%3E%3C%2Fp%3E&whiteSpace=normal
  2. Open IME and type a character without committing the composition
  3. Delete all composition string
  4. Type a character (either with or without IME)

AR

Typed text is inserted immediately after the previous word (i.e., the white-space disappears)

ER

Typed text should be after the previous white-space

Set release status flags based on info from the regressing bug 1923251

HTMLEditor::HandleInsertText handles empty text insertion only when it comes
from an eCompositionChange event. Then, it replaces existing composition
string with empty string, i.e., delete the composition string. Therefore, if
the previous character is a collapsible white-space, it will be invisible
if the composition string is the last content before the following block
boundary unless there is a padding <br>.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/5c6486c84c1c Make `HTMLEditor::HandleInsertText` try to insert a padding `<br>` if it replaces composition string with empty string r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch

HTMLEditor::HandleInsertText handles empty text insertion only when it comes
from an eCompositionChange event. Then, it replaces existing composition
string with empty string, i.e., delete the composition string. Therefore, if
the previous character is a collapsible white-space, it will be invisible
if the composition string is the last content before the following block
boundary unless there is a padding <br>.

Original Revision: https://phabricator.services.mozilla.com/D233613

Attachment #9446702 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: IME users, especially Korean language users and Android users, will complain about this bug.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: See comment 0 of the bug.
  • Risk associated with taking this patch: Really low
  • Explanation of risk level: The calling utility method is used in various places of delete handler, and the new caller runs only when IME inserts empty string to delete its composition string. So, this won't affect to the other cases.
  • String changes made/needed: none
  • Is Android affected?: yes
Flags: in-testsuite+
Attachment #9446702 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: