Closed Bug 1582010 Opened 5 years ago Closed 5 years ago

IME's candidate/suggest window may be positioned at wrong point in comment form of Office Online (Word/Excel/PowerPoint)

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla71
Tracking Status
firefox-esr60 --- wontfix
firefox-esr68 --- wontfix
firefox69 --- wontfix
firefox70 --- verified
firefox71 --- verified

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: inputmethod)

Attachments

(1 file)

STR

  1. Open Word/Excel/PowerPoint of Office Online
  2. Show comments pane with clicking "Comments" at top-right of their toolbar
  3. Click "New" to open comment form
  4. Type something at first line.
  5. Type Enter twice (i.e., cursor should be at third line)
  6. Type something with IME
  7. Type Backspace until going to the second line
  8. Type something with IME and try to convert it.

AR

Candidate window and/or suggest window of IME may show wrong point (i.e., not around caret).

This is our long standing bug. A patch is coming.

IMEContentObserver sends selection change notification only when it receives
a DOM Selection change notification received. However, selection range in
plaintext offset may be changed when changing previous content of caret is
changed. In this case, currently we notify IME of only text change and
that causes IME keep caching selection offsets in previous content. This
causes IME queries character rect out of bounds. Therefore, even if
IMEContentObserver hasn't received DOM Selection change notification,
it should recompute selection range and if it's changed, it should notify
IME of selection change too.

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/eff2ef054e11
Make `IMEContentObserver` always recompute selection range after sending text change notification r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71

Comment on attachment 9093509 [details]
Bug 1582010 - Make IMEContentObserver always recompute selection range after sending text change notification

Beta/Release Uplift Approval Request

  • User impact if declined: IME users type text with IME not comfortable in comment field of Office Online apps such as Word, Excel and PowerPoint if they remove one or more lines in it.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. Open Word, Excel and PowerPoint of Office Online and start editing a file
  1. Press "Comments" button in the toolbar (at right)
  2. Press "New" to show a comment field.
  3. Type something in the first line
  4. Type Enter some times (to make empty lines)
  5. Type a character with IME at last line
  6. Type Backspace key some times to remove the last line and empty lines (don't remove all empty lines at this step, i.e., you should stay in an empty line after this step)
  7. Type something with IME and convert it with IME (Type "a" -> "i" and Type space key if you use Japanese IME)

Then, at step 8, suggest window (shown at typing characters) and candidate window (shown at typing space character) should be shown immediately under caret.

  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patch just makes IMEContentObserver recompute selection range if it sends text changes to IME. I have assumed that if text change notification occurs, IMEContentObserver always receives selection change notification if we need to notify IME of selection changes too. However, this was wrong in some applications. (I.e., unnecessary computation may occur, but this is now necessary cost.)
  • String changes made/needed: none
Attachment #9093509 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Hello!
Reproduced the issue on Windows 10x64 with Firefox 71.0a1 (20190917155453). After doing STR mentioned above the suggest window is shown on the down left side of the browser window.
The issue is verified fixed with Firefox 71.0a1 (20190923094800) on Windows 10x64. The suggest window is correctly shown.

Comment on attachment 9093509 [details]
Bug 1582010 - Make IMEContentObserver always recompute selection range after sending text change notification

Fix for IME backspace error, verified in Nightly.
OK for uplift for beta 10.

Attachment #9093509 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Hello!
The issue is verified fixed with Firefox 70.0b10 (20190924213629) using Windows 10x64. The suggest window is correctly shown under the text on Word, Excel and PowerPoint of Office Online pages after doing the STR from comment 4.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: