Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mmolis1
Copy link
Contributor

@mmolis1 mmolis1 commented Sep 16, 2025

What

When style, which defines popover position, is not set, popover is rendered at the end of document.body. After initial render, popover get its trigger and content dimensions and recalculates style to correct one. It causes temporarily visible blinking effect when popover is rendered in lower left part of the screen and then in correct position (see below screencast).

20250407-1220-30.1741746.mp4

Similar thing happens when try to open same popover twice. On first opening, it calculates its position and store it in state. But if popover's trigger position changes, we can see blinking again, because popover renders on old position and then re-renders itself to correct position (see screencast).

Screen.Recording.2025-09-16.at.13.42.11.mov

To fix first problem, when style is empty, default style is used that is outside viewport. That way, user can't see first render and sees only popover in correct position.
Similarly, second problem is fixed by resetting style on each close.

Screen.Recording.2025-09-16.at.13.51.20.mov

Testing

  • Is this change covered by the unit tests?

  • Is this change covered by the integration tests?

  • Is this change covered by the automated acceptance tests? (if applicable)

Compatibility

  • Does this change maintain backward compatibility?

Screenshots

Before

After

@mmolis1 mmolis1 marked this pull request as ready for review September 16, 2025 10:59
@mmolis1 mmolis1 requested a review from a team as a code owner September 16, 2025 10:59
@sonarqubecloud
Copy link

@mmolis1 mmolis1 merged commit 7b3b66f into master Sep 16, 2025
6 of 7 checks passed
@mmolis1 mmolis1 deleted the ap-5360-fix-popover-position branch September 16, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants