-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Ensures correct IME behavior when the text input area gains or loses focus. #4896
Conversation
@@ -746,6 +746,10 @@ impl<'t> TextEdit<'t> { | |||
} | |||
} | |||
|
|||
if state.ime_enabled && response.lost_focus() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldnt you just leave the
state.ime_enabled` ? Because if its true its getting set to false and else it is already false, so to me it seems like an unnecessary condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn
t you just leave the
state.ime_enabled` ? Because if its true its getting set to false and else it is already false, so to me it seems like an unnecessary condition
When focus is moved elsewhere, you must set ime_enabled
to 'false`, otherwise the IME will have problems when focus returns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure the idea was the following
if response.lost_focus() {
state.ime_enabled = false;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure the idea was the following
if response.lost_focus() { state.ime_enabled = false; }
Yes, I thought about this too. If ime_enabled
is not true
, there is no need to check lost_focus()
, so there is a difference in speed and readability. Let's wait for emilk's opinion on which one is better.
thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok but if so it would be good to add a comment there anyway
state.ime_enabled
in multiple TextEdit
.Fix: Changed the handling method of `Ime::Preedit(_, None)` Fix: backspace fail after ime input * Related #4358 * Related #4430 * Related #4436 * Related #4794 * Related #4896 * Closes #4908 Issues: backspace fail after ime input * #4908 (Chinese) Changed the handling method of `Ime::Preedit(_, None)`
Fix: Changed the handling method of `Ime::Preedit(_, None)` Fix: backspace fail after ime input * Related emilk#4358 * Related emilk#4430 * Related emilk#4436 * Related emilk#4794 * Related emilk#4896 * Closes emilk#4908 Issues: backspace fail after ime input * emilk#4908 (Chinese) Changed the handling method of `Ime::Preedit(_, None)`
Fix: Changed the handling method of `Ime::Preedit(_, None)` Fix: backspace fail after ime input * Related emilk#4358 * Related emilk#4430 * Related emilk#4436 * Related emilk#4794 * Related emilk#4896 * Closes emilk#4908 Issues: backspace fail after ime input * emilk#4908 (Chinese) Changed the handling method of `Ime::Preedit(_, None)`
…oses focus. (emilk#4896) Fix: Ensures correct IME behavior when the text input area gains or loses focus. Fix: Handling `state.ime_enabled` in multiple `TextEdit`. Fix: A symptom of characters being copied when there are multiple TextEdits. * Related emilk#4137 * Related emilk#4358 * Closes emilk#4374 * Related emilk#4436 * Related emilk#4794 * Related emilk#4908 * Related emilk#5008 Fix Issues: When focus is moved elsewhere, you must set `state.ime_enabled = false`, otherwise the IME will have problems when focus returns. Fix Issues: A symptom of characters being copied when there are multiple TextEdits. Deletes all current `IME events`, preventing them from being copied to `other TextEdits`, without saving the `TextEdit ID`, ( Related Issues: Some `LINUX` seem to trigger an IME enable event on startup. So, when we gained focus, we do `state.ime_enabled = false`. )
Fix: Changed the handling method of `Ime::Preedit(_, None)` Fix: backspace fail after ime input * Related emilk#4358 * Related emilk#4430 * Related emilk#4436 * Related emilk#4794 * Related emilk#4896 * Closes emilk#4908 Issues: backspace fail after ime input * emilk#4908 (Chinese) Changed the handling method of `Ime::Preedit(_, None)`
…oses focus. (emilk#4896) Fix: Ensures correct IME behavior when the text input area gains or loses focus. Fix: Handling `state.ime_enabled` in multiple `TextEdit`. Fix: A symptom of characters being copied when there are multiple TextEdits. * Related emilk#4137 * Related emilk#4358 * Closes emilk#4374 * Related emilk#4436 * Related emilk#4794 * Related emilk#4908 * Related emilk#5008 Fix Issues: When focus is moved elsewhere, you must set `state.ime_enabled = false`, otherwise the IME will have problems when focus returns. Fix Issues: A symptom of characters being copied when there are multiple TextEdits. Deletes all current `IME events`, preventing them from being copied to `other TextEdits`, without saving the `TextEdit ID`, ( Related Issues: Some `LINUX` seem to trigger an IME enable event on startup. So, when we gained focus, we do `state.ime_enabled = false`. )
Fix: Ensures correct IME behavior when the text input area gains or loses focus.
Fix: Handling
state.ime_enabled
in multipleTextEdit
.Fix: A symptom of characters being copied when there are multiple TextEdits.
Related Fix IME bug where currently typed characters got copied #4137
Related Improve IME support with new
Event::Ime
#4358Closes Fix: A symptom of characters being copied when there are multiple TextEdits. #4374
Related IME for chinese #4436
Related Handle the IME event first in
TextEdit
to fix some bugs #4794Related backspace fail after ime input #4908
Related eframe Linux: Backspace & arrow keys are completely broken #5008
Fix Issues: When focus is moved elsewhere, you must set
state.ime_enabled = false
, otherwise the IME will have problems when focus returns.Fix Issues: A symptom of characters being copied when there are multiple TextEdits.
Deletes all current
IME events
, preventing them from being copied toother TextEdits
, without saving theTextEdit ID
,( Related Issues: Some
LINUX
seem to trigger an IME enable event on startup. So, when we gained focus, we dostate.ime_enabled = false
. )