fix data flicker when quickly changing between inputs#2558
Open
Alxndrsk wants to merge 1 commit intoeclipsesource:masterfrom
Open
fix data flicker when quickly changing between inputs#2558Alxndrsk wants to merge 1 commit intoeclipsesource:masterfrom
Alxndrsk wants to merge 1 commit intoeclipsesource:masterfrom
Conversation
✅ Deploy Preview for jsonforms-examples ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When using the @jsonforms/vue-vuetify renderers, typing quickly into an input field and immediately triggering a blur event (e.g., by pressing Tab to move to the next field) causes the input's visual value to temporarily revert to its previous state before finally settling on the newly typed value. This creates a noticeable "flicker" effect for fast typists.
To Reproduce:
Expected behavior: The input field should immediately and stably display the final typed value ("2") upon blur, without temporarily regressing to the previous state.
Technical Context & Proposed Solution: The issue is caused by the interaction between Vue/Vuetify's re-render cycle on blur and the 300ms debounce implemented in useVuetifyControl (inside src/util/composition.ts).
When the blur event triggers a re-render before the debounce has resolved, the local DOM temporarily syncs with the stale JSONForms state.
This can be easily fixed by flushing the changeEmitter inside the underlying handleBlur as done in the pull request