invalidateCharacterCoordinates does not trigger firstRectForCharacterRange

Originator:motownavi
Number:rdar://FB8936158 Date Originated:2020/12/10
Status:Open Resolved:
Product:InputMethodKit Product Version:11.0
Classification: Reproducible:
 
This is present in Big Sur 11.1 beta (20C5061C) but we see this on 10.14.6 and 10.15.6, and likely earlier versions.

To repro:
1. Open Terminal app and open a window.
2. Switch to the Hiragana IME.
3. Start typing, and cause a candidate window to appear.
4. Move the Terminal window, and notice the candidate window does not move.

Alternate versions:
1. Open Safari or Chrome, navigate to docs.google.com and open a new document.
2. Switch to the Hiragana IME.
3. Start typing, and cause a candidate window to appear.
4. Scroll the document, and notice the candidate window does not move.

This looks to be a deficiency in the IME system. I can’t speak to Safari or Terminal, but in Chrome we correctly invalidate the character bounds using -[NSTextInputContext invalidateCharacterCoordinates]. However, while the IME system *should* then immediately re-entrantly call -[NSTextInputClient firstRectForCharacterRange:actualRange:] so that it knows the new location of where to put the candidate window, it does not. There doesn’t appear to be any way for an app to notify the IME to move the candidate window.

For reference, this was reported as https://crbug.com/1151301 in Chrome, but this appears to be a fundamental implementation issue in the macOS IME system.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!