This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
Improve IME support - #852
Merged
Merged
Conversation
zcbenz
commented
Sep 17, 2013
Contributor
- Make IME's input bubble follow the cursor.
- Fix OS X's accented character suggestion. (Creating non-latin letters using the OSX internationalization bubble creates additional letters electron/electron#50)
- Show IME's composition text in the editor (IME bug #795)
This is required to make IME's input bubble follow the cursor.
The composition text should only show on screen temporarily and gets disappered when input is cancelled or done. We simply mark the composition as selected, so it can not only indicate this is composition text instead of normal text, but also updates the composition without adding new interfaces.
Some IME's input bubble would have strange behavior when they thought the target input box is small.
On OS X, press and hold `c` could show an accent menu to replace `c` with accented ones like `ć`, there is no corresponding events in W3C, so we detected it by checking whether the text in input box are selected (this is how Chrome implemented this feature). And also note that IME inputs were handled the same way in Chrome, the compostion text would be marked as selected and got replaced with final inputs. However the compostion text won't trigger textInput event, so it's distinguished by checking whether the hiddenInput's value are changed by Chrome. Fixes electron/electron#50.
|
Nice! On Mon, Sep 16, 2013 at 9:34 PM, Cheng Zhao [email protected]:
|
|
Did you notice if this impacts typing performance at all? |
Contributor
Author
|
Hmm, I didn't notice any performance regression. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.