-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
TextInput paragraph state cache #2318
Labels
bug
Something isn't working
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Is this issue related to iced?
What happened?
Hi, I’m using iced with bevy using https://github.com/tasgon/bevy_iced and I’m trying to update it from iced 0.10 to 0.12, but the integration of
TextInput
seems to be affected by the state caching introduced in #2058.The issue is that the paragraph update applied in TextInput’s
on_event
in by theupdate_cache
closure sometimes gets out of sync with the actual value, because in the integration the input message is passed via bevy’s event system which is sometimes delayed by a frame, which causes the input to flicker.From what I can see the flicker is due to
fn offset
being calculated using the cache state before the actual value is updated via the propagated event. This is even worse with.secure(true)
input where the raw input is shown for a frame. I’m not yet too familiar with the iced internals so I’m not sure what would be a right approach to fix this (and if there are any other widgets that may be affected by this?), but I’m happy to collaborate on a patch. When I removed the call toupdate_cache
the problem in the integration goes away.What is the expected behavior?
Visual integrity on text input. Cache should not affect the view before the event is processed by the app.
Version
crates.io release
Operating System
Linux
Do you have any log output?
No response
The text was updated successfully, but these errors were encountered: