Repository navigation
fix: pick up field values filled by password managers and extensions - #296
Merged
Merged
Conversation
Password managers and other extensions fill a field with their own script-made input event. It never left the Vaadin field's shadow root, so the field showed the value but the form never saw it. A Vaadin text field or text area that listens for `input` on the field itself needs to import src/utils/composed-vaadin-input to see these fills. Fixes FX-890 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pheekus
marked this pull request as draft
November 19, 2026 21:34
pheekus
marked this pull request as ready for review
November 19, 2026 22:10
- Skip the re-dispatch when the field sits inside another Vaadin element. Combo box and date picker treat any input from their text field as typing, so an extension fill opened their overlay. - Skip it when the field value did not change, for example when `preventInvalidInput` rejects the fill. - Patch the classes once they are defined instead of importing them. Loading the patch no longer loads or registers vaadin-text-area and vaadin-text-field. A Vaadin copy without `_onInput` is left alone. - Load the patch once from the themeable mixin instead of from 11 element files, so new elements get it without their own import. - Remove the sign-in form's autofill poller. The patch now covers these fills, and the poller sent an input event and an edit every 250 ms for each filled field. Refs FX-890 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brettflorio
approved these changes
Nov 20, 2026
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.
Values filled into text, email, password and text area fields by password managers and other browser extensions now reach the form. Before, the field showed the value, but the form stayed unchanged: no Save button, and the value was not saved. Typing and pasting already worked. A fill that sends no event at all is still missed. No listener can catch it. Fixes FX-890.
How it works:
Vaadin 14 text fields keep the native
<input>in their shadow root. Extensions set its value and dispatchnew Event('input', { bubbles: true }). Script-made events are not composed, so they stop at that shadow root, and@inputlisteners on the field never run. Vaadin's own handler still sees the event.src/utils/composed-vaadin-input.tswaits untilvaadin-text-fieldandvaadin-text-areaare defined, then wraps_onInputon their classes. When the original event was not composed and the field value changed, it dispatches a composedinputfrom the field. It skips fields inside anothervaadin-*element.The util imports no Vaadin code, so loading it does not register any element.
src/mixins/themeable.tsimports it. Elements load that module throughThemeableorTranslatable, so new elements get the fix without their own import.The sign-in form's autofill poller is removed. It sent an
inputevent and an edit every 250 ms for each filled field. The patch now covers those fills.