fix: reset login overlay fields and disabled state on close - #12274
Merged
Conversation
`_openedChanged` was called with a single argument, so `oldOpened` was always `undefined` and the branch that clears the username and password fields and re-enables the form never ran. Pass the previous value from the changed properties map. Regression since 25.0.0, where the Polymer `_onOpenedChange` observer was replaced with a call from `updated()`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
vaadin-review-bot
left a comment
There was a problem hiding this comment.
✅ Nothing to flag — the changes look good.
tomivirkki
approved these changes
Jul 30, 2026
DiegoCardoso
approved these changes
Jul 30, 2026
web-padawan
added a commit
that referenced
this pull request
Jul 30, 2026
web-padawan
added a commit
that referenced
this pull request
Jul 30, 2026
vursen
pushed a commit
that referenced
this pull request
Aug 5, 2026
Collaborator
|
This ticket/PR has been released with Vaadin 25.3.0-alpha8. |
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.



Closing the login overlay is supposed to clear the username and password fields and re-enable the form, so that reopening it starts from a clean state. That has not worked since 25.0.0.
_openedChanged(opened, oldOpened)is called fromupdated()with a single argument, sooldOpenedis alwaysundefinedand the whole reset branch is dead code. Before #9794 this was a Polymer observer (_onOpenedChange) that readthis.openeddirectly and needed no previous value.Reproduction
Using
dev/login-overlay.html: type a username and a password, click Log in, then reopen the overlay. The old values are still there and the Log in button stays disabled. Measured right after closing:Expected
disabled: falseand empty fields. This is why the dev page has to setlogin.disabled = falsebefore reopening.Changes
The previous value comes from the changed properties map, so the reset only runs on a real open → closed transition. Reading
!openedinstead would also run it on the first render and would resetdisabledwhen it is set before the element is attached —initially closed > should not enable the submit button when disabled is set before attachingcovers that.Clearing the fields also applies when the element is removed from the DOM while open, which matches the behavior in 24.x.
Related to #12272
🤖 Generated with Claude Code