Skip to content
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: A symptom of characters being copied when there are multiple TextEdits. #4374

Closed
wants to merge 9 commits into from

Conversation

rustbasic
Copy link
Contributor

@rustbasic rustbasic commented Apr 17, 2024

Fix: A symptom of characters being copied when there are multiple TextEdits.

@@ -44,6 +44,10 @@ pub struct TextEditState {
#[cfg_attr(feature = "serde", serde(skip))]
pub(crate) has_ime: bool,

// target ID for IME candidate.
#[cfg_attr(feature = "serde", serde(skip))]
pub(crate) ime_target_id: Id,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this always be the same Id as the key used to find TextEditState?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it only stores TextEdit ID.
It's currently working fine without any problems.
If something is wrong or needs to be fixed, please fix it or let me know.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That the code is working fine is not enough. I need to maintain this, and so I need to understand it. Storing the Id here makes no sense to me, since it is already the key.

@rustbasic rustbasic requested a review from emilk April 21, 2024 11:16
@emilk emilk marked this pull request as draft April 21, 2024 17:32
@emilk
Copy link
Owner

emilk commented Apr 21, 2024

Blocked on #4358

@rustbasic
Copy link
Contributor Author

rustbasic commented Apr 22, 2024

@emilk

for example,
This is necessary because after entering the Login ID, if you select the Login Password line to enter the password, part of the Login ID will be copied.

Please review.

@rustbasic rustbasic reopened this Apr 22, 2024
@rustbasic rustbasic marked this pull request as ready for review April 23, 2024 06:52
@rustbasic rustbasic closed this Aug 4, 2024
@rustbasic rustbasic deleted the patch45 branch August 7, 2024 15:08
emilk pushed a commit that referenced this pull request Aug 28, 2024
…oses focus. (#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 #4137
* Related #4358 
* Closes #4374
* Related #4436
* Related #4794 
* Related #4908 

* Related #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`. )
486c pushed a commit to 486c/egui that referenced this pull request Oct 9, 2024
…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`. )
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
…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`. )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants