google / mozc

Mozc - a Japanese Input Method Editor designed for multi-platform
Other
2.32k stars 330 forks source link

Mozc updates its input mode upon focusing only when InputScope is changing from the previously observed one #826

Closed yukawa closed 8 months ago

yukawa commented 8 months ago

Description

In terms of InputScope handling, there is another behavior difference between Mozc and MS-IME (Windows 11 22H2) when moving control/window focus.

MS-IME always updates its input mode based on InputScope associated with the newly focused input field, while Mozc does nothing if the specified InputScope is the same as the one that Mozc observed in the previous focus. https://github.com/google/mozc/blob/5757f28e1fd21dda58100ecf4a0f0c161c7120ce/src/win32/tip/tip_input_mode_manager.cc#L202-L223

Steps to reproduce

Steps to reproduce the behavior:

  1. Install Mozc.
  2. Open Google Chrome or Microsoft Edge (without incognito mode)
  3. Make sure that Mozc is selected as the current IME.
  4. Paste data:text/html,<html><input type="email"/><input type="email"/></html> into the address bar and hit the enter key.
  5. Focus into the left input box. Make sure that Mozc is in the direct mode.
  6. Enable Mozc. Make sure that Mozc is in the Hiragana mode.
  7. Move to the right input box.

Expected behavior

At the step 7, Mozc is in the direct mode again. MS-IME actually changes its mode to the direct mode in the same steps.

Actual behavior

At the step 7, Mozc remains to be in the Hiragana mode.

Version or commit-id

5757f28e1fd21dda58100ecf4a0f0c161c7120ce

Environment

Additional context

We should be able to fix this issue just by removing the following lines. https://github.com/google/mozc/blob/5757f28e1fd21dda58100ecf4a0f0c161c7120ce/src/win32/tip/tip_input_mode_manager.cc#L220-L223