Mouse down events are consumed once Firefox is inactivated during composition of All Korean IME of Apple on Catalina
Categories
(Core :: Widget: Cocoa, defect, P1)
Tracking
()
People
(Reporter: korsnack, Assigned: masayuki)
Details
(Keywords: inputmethod)
Attachments
(1 external file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:73.0) Gecko/20100101 Firefox/73.0
Steps to reproduce:
- Korean is selected as current input source
- Spend some time
- Activate browser window (Cmd+Tab)
Actual results:
"Sometimes" whole browser window does not accept any click input.
Once after changing input source to English, everything gets back into normal.
Expected results:
Browser should accept click input.
| Reporter | ||
Comment 1•6 years ago
|
||
It is hard to reproduce since it does not "always" happen, but this keeps happening on my PC few times a day, and apparently my friends are having same issue.
Comment 2•6 years ago
|
||
Hello,
I checked if this issue occurs on Nightly version 75.0a1 (2020-02-13), beta version 74.0b3 and the current release 73.0 using the steps provided but was unable to reproduce it.
Can you please re-test the issue while in Safe Mode. You can find helpful info here : https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode .
Also a fresh new profile could help. You can find more about creating a new profile here : https://support.mozilla.org/en-US/kb/troubleshoot-and-diagnose-firefox-problems#w_6-create-a-new-firefox-profile .
If possible, you can test this issue on the nightly build as well. Download the build from : https://www.mozilla.org/en-US/firefox/nightly/all/ .
| Reporter | ||
Comment 3•6 years ago
|
||
I'm going to try to reproduce with freshly installed Nightly build (75.0a1 at the moment), no profile and in safe mode.
| Reporter | ||
Comment 4•6 years ago
|
||
Finally I've found a reliable way to reproduce this behavior.
Video: https://www.youtube.com/watch?v=A3fjhpFgmbY
- Change input source to Korean (2-set)
- Focus an input (address bar, <input> in document, ...), start type something, and don't finish a character (which is an important part)
- notice on the video above, I've typed
한글into address bar, but autocomplete thingy only shows한, since글character has not completed
- notice on the video above, I've typed
- Switch to different window, then back to Firefox
- Nothing can't be clicked (document still can receive hover/mouseover events)
This does not happen in other apps, or with Japanese input. I'm not sure same issue exists with 3-set inputs, or previous versions of macOS.
If character is finished by switching to different input source or pressing arrow key, this issue does not happen.
| Reporter | ||
Comment 5•6 years ago
|
||
Update: In step 2, you don't have to type into Firefox. Just type into any application. VS Code, iTerm, or even Spotlight search. Type Korean, don't finish last character, then Firefox stops accepting click input.
| Reporter | ||
Comment 6•6 years ago
|
||
(In reply to Jaemin Noh from comment #5)
Update: In step 2, you don't have to type into Firefox. Just type into any application. VS Code, iTerm, or even Spotlight search. Type Korean, don't finish last character, then Firefox stops accepting click input.
Sorry. Ignore this. I've made a mistake. Looks like Firefox was already in an unclickable state.
Comment 7•6 years ago
|
||
I was able to reproduce this on the latest Nightly version 75.0a1 (2020-03-06) .
I was unable to find a regression since the issue is intermitent and also reproducible on FF 65.0a1 from 02 December 2018.
Comment 8•6 years ago
|
||
Bugbug thinks this bug is a regression, but please revert this change in case of error.
| Reporter | ||
Comment 9•6 years ago
|
||
I'm not sure this information helps, but I've observed same behavior with a JetBrains product(PyCharm, to be specific). I couldn't find any other software have same issue.
I think Firefox doing something different at some point on input handling with others.
Comment 10•6 years ago
|
||
n-i Masayuki in case he has an idea of what might be happening here.
| Assignee | ||
Comment 11•6 years ago
|
||
I can reproduce this bug only on Catalina (10.15). And I took a log, but I don't see any odd log in it.
Perhaps, we hit a bug of 2-set IME on Catalina. According to (document of IMK](https://developer.apple.com/documentation/inputmethodkit/imkmousehandling?language=objc), IME can steal mouse events. I guess 2-set IME unexpectedly consumes our mouse events at this situation. I'll look for some hack for avoiding the situation.
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 12•6 years ago
|
||
According to the symptom, 2-set Korean IME keeps handling (and consuming) mouse events even after its composition is discarded. I'm still not sure the reason, but once you set an <input> element or something which is editable, you can restart to use mouse buttons again. So, this behavior must be a big hint how to fix this bug.
| Assignee | ||
Comment 14•6 years ago
|
||
I still don't find the reason and a way to avoid it. Oddly, even if I commented out the API calls during focus change, I reproduce it.
| Assignee | ||
Comment 15•6 years ago
|
||
Okay, I got the reason why mousedown events are consumed by the Korean IME. We're the only browser which allows IME to handle mouse button events.
https://searchfox.org/mozilla-central/rev/d6f957415cf009995ecb539ef1425316d82164a9/widget/cocoa/TextInputHandler.mm#4668,4672-4673
So, oddly, when it happens, Korean IME starts to consume all coming native mousedown events accidentally. I'll keep investigating how we can avoid this.
| Assignee | ||
Comment 16•6 years ago
|
||
I can reproduce this bug with any Korean IME of Apple, but I cannot reproduce this with other languages' IMEs. Therefore, I reported this to Apple.
| Assignee | ||
Comment 17•6 years ago
|
||
The bugs is reproducible only with all Korean IMEs of Apple only on Catalina.
Until Apple fixes the bug, we should not allow the Korean IMEs to consume
mouse events. (I think that we should keep notifying all mouse events for
backward compatibility.)
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
Comment 18•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Comment 19•6 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 20•6 years ago
|
||
Comment on attachment 9134067 [details]
Bug 1614252 - Don't allow Korean IMEs of Apple to consume mouse events when there is no composition
Beta/Release Uplift Approval Request
- User impact if declined: Most Korean language users uses Korean IME for typing Hangul characters. The behavior is similar to dead key in Western languages'. Therefore, user may switch window while they type Hangul characters or another application may steal focus during typing Korean characters. When users meet the situation, all mouse button down events are consumed by Korean IME even if there is no composing Hangul character. So, when user meets this bug, user could consider stop using Firefox.
I checked the fix in my local build and try build for Beta.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: 1. Load https://w3c.github.io/uievents/tools/key-event-viewer.html
- Type Hangul characters with a Korean IME on Catalina (all Korean IME on Catalina have this bug)
- When you see underlined Hangul character, click desktop or another app's window
- Switch back to Firefox's window with clicking title bar or
Cmd+Tab. - Click any elements like tabs, searchbar, URL bar.
Then, focus should be set to the clicked element normally.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This only stops consuming mouse events when:
- On Catalina (10.15)
- There is no composing string
- Active IME is a Korean IME of Apple
Even if there were regressions, IME couldn't consume handled mouse events. But it must be rare case. Usually, mouse events may be handled by IMEs for:
- Committing composing string
- Selecting target to convert clause at typing Japanese text
However, these features are optional, and currently, the latter isn't supported on major Japanese IMEs on macOS (I confirmed with Apple's Kotoeri, ATOK and Google Japanese Input). - String changes made/needed:
| Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 21•6 years ago
|
||
Hello I have managed to reproduce the issue on Fx 75.0a1 (2020-03-06) using MacOS 10.15.4, I can confirm that the issue is fixed on Fx 76.0a1 (2020-03-20).
Comment 22•6 years ago
|
||
Sounds like a longstanding issue, IME tends to be fragile and not covered by automated tests, I think this should ride the trains.
Updated•6 years ago
|
| Assignee | ||
Comment 23•6 years ago
|
||
(In reply to Julien Cristau [:jcristau] from comment #22)
Sounds like a longstanding issue, IME tends to be fragile and not covered by automated tests, I think this should ride the trains.
No, it's not a long standing bug because we hit a bug of Catalina's Korean IME bug. And the symptom is really critical.
Comment 24•6 years ago
|
||
Catalina shipped in October, though, why are we only finding out about this now?
| Assignee | ||
Comment 25•6 years ago
|
||
(In reply to Julien Cristau [:jcristau] from comment #24)
Catalina shipped in October, though, why are we only finding out about this now?
I think that it depends on the rate of Korean language users of us and the rate of reporting bug users of them. (I don't know the rate of the former, and of course the latter too.)
| Assignee | ||
Comment 26•6 years ago
|
||
(And I don't know how much users start to use new macOS immediately after the release...)
| Reporter | ||
Comment 27•6 years ago
|
||
Not many people use macOS AND Firefox in Korea(maybe less than a percent?), so that could be one reason.
Judging from my tweet from January, I've been suffering this issue for a long time. Since I update my Mac as soon as a new version is released, it could've been bothering me for half a year. I just didn't know how to reproduce it for a long time.
Comment 28•6 years ago
|
||
Comment on attachment 9134067 [details]
Bug 1614252 - Don't allow Korean IMEs of Apple to consume mouse events when there is no composition
targeted workaround for a Korean IME issue on macos 10.15, for 75.0b10
Updated•6 years ago
|
Comment 29•6 years ago
|
||
| bugherder uplift | ||
Comment 30•6 years ago
|
||
Hello I managed to reproduce the issue on Fx 75.0b9 using MacOs 10.15.4 and I can confirm that the issue is fixed in the build provided in comment 29 (75.0b10).
Comment 31•6 years ago
|
||
Ryan, do you consider this needs to be uplifted in esr?
Comment 32•6 years ago
|
||
I'd prefer to let this bake before we make that decision.
Comment 33•6 years ago
|
||
Hello Masayuki, is this something you feel we should take on ESR as well? I haven't heard of any regressions caused by this, but I also haven't heard of any complaints about this not being fixed there either.
| Assignee | ||
Comment 34•6 years ago
|
||
Well, ESR will be used until 22-September at most. But we'll ship new ESR in end of June... I guess that in the normal situation, we don't need to fix it in ESR 68, however, many companies/organizations using ESR may not have much time to switch ESR to 78 in this summar because of COVID-19 situation. Do we have some (new) consideration for uplifting patches to ESR in this situation? (E.g., considering longer support of ESR 68?)
Comment 35•6 years ago
|
||
We're not planning to lengthen the support timeframe for ESR68.
| Assignee | ||
Comment 36•6 years ago
|
||
Okay, then, I think that we should uplift it to ESR68 only when some users request it actually. (I feel it does not make sense to use ESR68, but use the latest macOS if users need stable environment...)
Updated•6 years ago
|
Updated•6 years ago
|
Description
•