Skip to content

[EuiPopover] Reset isClosing state on opening a popover - #8882

Merged
mgadewoll merged 3 commits into
elastic:mainfrom
mgadewoll:popover/8879-reset-closing-state
Jul 22, 2025
Merged

mgadewoll merged 3 commits into
elastic:mainfrom
mgadewoll:popover/8879-reset-closing-state

Conversation

@mgadewoll

@mgadewoll mgadewoll commented Jul 18, 2025 •

Copy link
Copy Markdown
Contributor

Summary

closes #8879

This PR aims to fix an issue on EuiPopover where rapid clicking of the popover toggle element would result in the popover not being closable via click outside or Escape key press.
If the click interval is big enough to account for the closingTransitionTimeout then the popover would be closable as expected. If the interval is too short though, it would result in both isOpening and isClosing state being true.

Screen.Recording.2025-07-18.at.16.47.27.mov

Ensuring that isClosing state is reset when opening a popover resolves this issue.

Why are we making this change?

Fixing a bug on EuiPopover to ensure the popover is always closable.

Screenshots

before after
Screenshot 2025-07-18 at 16 37 28 Screenshot 2025-07-18 at 16 37 44

Impact to users

🟢 There are no updates needed on consumer side.

QA

  • ci passes and the newly added regression tests succeed
  • compare production and staging behavior and verify that the popover closes as expected

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately.
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

@mgadewoll mgadewoll self-assigned this Jul 18, 2025
@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

cc @mgadewoll

@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

cc @mgadewoll

@mgadewoll
mgadewoll marked this pull request as ready for review July 18, 2025 15:54
@mgadewoll
mgadewoll requested a review from a team as a code owner July 18, 2025 15:54
@weronikaolejniczak
weronikaolejniczak self-requested a review July 21, 2025 12:23

@weronikaolejniczak weronikaolejniczak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 LGTM! Thank you for fixing this, @mgadewoll!

@mgadewoll
mgadewoll merged commit abaec00 into elastic:main Jul 22, 2025
tkajtoch added a commit to elastic/kibana that referenced this pull request Aug 5, 2025
`106.1.0` ⏩ `106.2.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

## Package updates

### `@elastic/eui`

#### [`v106.2.0`](https://github.com/elastic/eui/releases/v106.2.0)

- Enhanced `EuiCheckableCard` to make non-interactive children clickable
for card selection ([#8907](elastic/eui#8907))
- Added `showFooter` and `toolbarProps.right` props to
`EuiMarkdownEditor` for more flexible layout control.
([#8889](elastic/eui#8889))
([#8889](elastic/eui#8889))

**Bug fixes**

- Fixed `EuiPopover` not closing on outside click after multiple fast
clicks on the trigger element
([#8882](elastic/eui#8882))

**Accessibility**

- Added accessible labels to virtualized `EuiCodeBlock`
([#8887](elastic/eui#8887))

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Marta Bondyra <[email protected]>
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.

Spam clicking an EuiPopover anchor will cause it to sometimes not close on outside click

3 participants