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: reset overlay position target to avoid closing after items change #7702

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Aug 28, 2024

Description

Fixes vaadin/flow-components#6580
Fixes vaadin/flow-components#6577

The issue is caused by the fact that I removed setting positionTarget to undefined in #7524 and therefore by the first time _updatePosition() is called, the positionTarget still contains a reference to the old menu-bar button which is no longer in the DOM. And then getBoundingClientRect().width for this button is 0 and that closes overlay since #7454.

Type of change

  • Bugfix

Copy link

sonarcloud bot commented Aug 28, 2024

Copy link
Contributor

@DiegoCardoso DiegoCardoso left a comment

Choose a reason for hiding this comment

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

I can confirm that this PR fixes the regression reported in vaadin/flow-components#6577

@web-padawan web-padawan merged commit e35ae49 into main Aug 28, 2024
9 checks passed
@web-padawan web-padawan deleted the fix/menu-bar-reset-position-target branch August 28, 2024 14:14
web-padawan added a commit that referenced this pull request Aug 29, 2024
#7702) (#7705)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.5.0.alpha13 and is also targeting the upcoming stable 24.5.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants