[EuiModal] Support focusTrapProps to handle manual return focus#8945
Merged
mgadewoll merged 5 commits intoelastic:mainfrom Aug 25, 2025
Merged
[EuiModal] Support focusTrapProps to handle manual return focus#8945mgadewoll merged 5 commits intoelastic:mainfrom
focusTrapProps to handle manual return focus#8945mgadewoll merged 5 commits intoelastic:mainfrom
Conversation
allows same API of manual return focus handling as for flyouts
Collaborator
💚 Build Succeededcc @mgadewoll |
Collaborator
💚 Build Succeeded
cc @mgadewoll |
weronikaolejniczak
approved these changes
Aug 25, 2025
Contributor
weronikaolejniczak
left a comment
There was a problem hiding this comment.
LGTM! 🟢 Tested the story, verified doc entries are correct, and checked the implementation.
Not that important but the EuiModal / EuiFlyout docs screenshots were hosted on https://private-user-images.githubusercontent.com/ so when I click on them, I don't have access. It's fine though, I used the staging link. Might be worth to take a look into though for future PRs.
mgadewoll
added a commit
to elastic/kibana
that referenced
this pull request
Aug 27, 2025
- `@elastic/eui`: `v106.3.0` ⏩ `v106.4.0` - `@elastic/eui-theme-borealis`: `v3.3.1` ⏩ `v3.3.2` [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 ## [`v106.4.0`](https://github.com/elastic/eui/releases/v106.4.0) - Added prop `focusTrapProps` on `EuiModal` ([#8945](elastic/eui#8945)) **Bug fixes** - Fixed the syntax of the SCSS variable `$euiColorTransparent` to ensure a valid value ([#8966](elastic/eui#8966)) - Fixed `restrictWidth` not applying to `EuiPageHeaderContent` when only `children` are used as content ([#8965](elastic/eui#8965)) **Accessibility** - Fixed an issue where pressing Shift + Tab on the last tabbable element inside `EuiInputPopover` popover would close the popover unexpectedly ([#8950](elastic/eui#8950)) ### `@elastic/eui-theme-borealis` ## [`v3.3.2`](https://github.com/elastic/eui/releases/v3.3.2) **Bug fixes** - Fixed the syntax of the SCSS variable `$euiColorTransparent` to ensure a valid value ([#8966](elastic/eui#8966))
arup-chauhan
pushed a commit
to arup-chauhan/eui
that referenced
this pull request
Aug 29, 2025
kowalczyk-krzysztof
pushed a commit
to kowalczyk-krzysztof/kibana
that referenced
this pull request
Aug 30, 2025
- `@elastic/eui`: `v106.3.0` ⏩ `v106.4.0` - `@elastic/eui-theme-borealis`: `v3.3.1` ⏩ `v3.3.2` [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 ## [`v106.4.0`](https://github.com/elastic/eui/releases/v106.4.0) - Added prop `focusTrapProps` on `EuiModal` ([elastic#8945](elastic/eui#8945)) **Bug fixes** - Fixed the syntax of the SCSS variable `$euiColorTransparent` to ensure a valid value ([elastic#8966](elastic/eui#8966)) - Fixed `restrictWidth` not applying to `EuiPageHeaderContent` when only `children` are used as content ([elastic#8965](elastic/eui#8965)) **Accessibility** - Fixed an issue where pressing Shift + Tab on the last tabbable element inside `EuiInputPopover` popover would close the popover unexpectedly ([elastic#8950](elastic/eui#8950)) ### `@elastic/eui-theme-borealis` ## [`v3.3.2`](https://github.com/elastic/eui/releases/v3.3.2) **Bug fixes** - Fixed the syntax of the SCSS variable `$euiColorTransparent` to ensure a valid value ([elastic#8966](elastic/eui#8966))
qn895
pushed a commit
to qn895/kibana
that referenced
this pull request
Sep 2, 2025
- `@elastic/eui`: `v106.3.0` ⏩ `v106.4.0` - `@elastic/eui-theme-borealis`: `v3.3.1` ⏩ `v3.3.2` [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 ## [`v106.4.0`](https://github.com/elastic/eui/releases/v106.4.0) - Added prop `focusTrapProps` on `EuiModal` ([elastic#8945](elastic/eui#8945)) **Bug fixes** - Fixed the syntax of the SCSS variable `$euiColorTransparent` to ensure a valid value ([elastic#8966](elastic/eui#8966)) - Fixed `restrictWidth` not applying to `EuiPageHeaderContent` when only `children` are used as content ([elastic#8965](elastic/eui#8965)) **Accessibility** - Fixed an issue where pressing Shift + Tab on the last tabbable element inside `EuiInputPopover` popover would close the popover unexpectedly ([elastic#8950](elastic/eui#8950)) ### `@elastic/eui-theme-borealis` ## [`v3.3.2`](https://github.com/elastic/eui/releases/v3.3.2) **Bug fixes** - Fixed the syntax of the SCSS variable `$euiColorTransparent` to ensure a valid value ([elastic#8966](elastic/eui#8966))
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.
Summary
This PR updates
EuiModaland adds the propfocusTrapProps. This update aims to support manually returning focus on closing a modal in the same way thatEuiFlyoutdoes.Currently when the focus is not being returned automatically, the only way to return focus on closing a modal is to do it as part of the
onClosecallback.Additional changes
EuiModalandEuiFlyoutWhy are we making this change?
Aligning the API for the same functionality across different components.
Screenshots
Screen.Recording.2025-08-05.at.17.57.28.mov
Impact to users
🟢 There are no updates needed on consumer side.
QA
General checklist
Checked in both light and dark modesChecked in both MacOS and Windows high contrast modesChecked in mobileProps have proper autodocs (using@defaultif default values are missing) and playground togglesChecked Code Sandbox works for any docs examplesUpdated visual regression testsIf applicable, added the breaking change issue label (and filled out the breaking change 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)