MS-IME for Japanese is disabled after changing window focus

RESOLVED FIXED in Firefox 56

Status

()

Core
Widget: Win32
P1
normal
RESOLVED FIXED
7 months ago
7 months ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

({inputmethod, regression})

56 Branch
mozilla57
All
Windows 10
inputmethod, regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox55 unaffected, firefox56 fixed, firefox57 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

+++ This bug was initially created as a clone of Bug #1381732 +++

STR:
0. Activate MS-IME for Japanese
1. Open Gmail
2. Click "Compose"
3. Write some text in message body with IME enabled (e.g. あ)
4. Alt+Tab to another non-Firefox window.
5. Alt+Tab back to the Firefox window with Gmail.
6. Press 'a' in the keyboard.

Expected results:
IME is still active and, e.g. あ is produced.

Actual results:
The IME is disabled (in the taskbar an 'x' is shown') and hence 'a' is produced. Furthermore, it is not possible to activate to the IME be pressing the 半角/全角漢字 button. If I click the text area again, however, the IME is enabled and activated.


Only MS-IME for Japanese behaves differently then all other IMEs. When the process is being inactivated, MS-IME handles focus message by themselves and sets focused text store in the thread manager to nullptr.  Therefore, only with MS-IME for Japanese, TSFTextStore::GetIMENotificationRequests() returns no requests (i.e., not includes IMENotificationRequests::NOTIFY_DURING_DEACTIVE).  Therefore, IMEStateManager will send NOTIFY_IME_OF_BLUR notification but IMEContentObserver still in the remote process.  Therefore, when we're activated again, NOTIFY_IME_OF_FOCUS won't be notified and TSFTextStore won't be recreated again.  This is the cause of this bug.
Comment hidden (mozreview-request)

Comment 3

7 months ago
mozreview-review
Comment on attachment 8892856 [details]
Bug 1386556 - TSFTextStore::GetIMENotificationRequests() should always return notification requests for sEnabledTextStore

https://reviewboard.mozilla.org/r/163868/#review169634
Attachment #8892856 - Flags: review?(m_kato) → review+

Comment 4

7 months ago
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/40709a4338d4
TSFTextStore::GetIMENotificationRequests() should always return notification requests for sEnabledTextStore r=m_kato

Comment 5

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/40709a4338d4
Status: ASSIGNED → RESOLVED
Last Resolved: 7 months ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Please request Beta approval on this when you get a chance.
status-firefox55: --- → unaffected
status-firefox56: --- → affected
status-firefox-esr52: --- → unaffected
Flags: needinfo?(masayuki)

Comment 7

7 months ago
https://hg.mozilla.org/projects/date/rev/40709a4338d41f0d75f5e4726df51d5aee27f94d
Bug 1386556 - TSFTextStore::GetIMENotificationRequests() should always return notification requests for sEnabledTextStore r=m_kato
Comment on attachment 8892856 [details]
Bug 1386556 - TSFTextStore::GetIMENotificationRequests() should always return notification requests for sEnabledTextStore

Approval Request Comment
[Feature/Bug causing the regression]:
Perhaps, regression of bug 1377672.

[User impact if declined]:
If active IME is MS-IME for Japanese (default of Window-Ja), user cannot input text with MS-IME after activating a window of Firefox. After moving focus to another element, user can restore the IME state, though.

[Is this code covered by automated tests?]:
No.

[Has the fix been verified in Nightly?]:
Yes.

[Needs manual test from QE? If yes, steps to reproduce]:
No.

[List of other uplifts needed for the feature/fix]:
No.

[Is the change risky?]:
No.

[Why is the change risky/not risky?]:
This just requests content change notifications even if IME context managed by us temporarily lost focus. Note that even if IME loses focus, while we're managing IME context, the content needs to receive notifications of content changes.

So, I meant that this patch does not change our behavior. Just changing the condition of receiving notifications of content changes.

[String changes made/needed]:
No.
Flags: needinfo?(masayuki)
Attachment #8892856 - Flags: approval-mozilla-beta?
Comment on attachment 8892856 [details]
Bug 1386556 - TSFTextStore::GetIMENotificationRequests() should always return notification requests for sEnabledTextStore

Fix for IME focus-related regression in 56, let's uplift this for beta 2.
Attachment #8892856 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment 10

7 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/df7481e477c7
status-firefox56: affected → fixed
You need to log in before you can comment on or make changes to this bug.