diff --git a/CHANGELOG.md b/CHANGELOG.md index ef4617dcc20c..8d869121f8f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ **Bug fixes** - Fixed bug in `EuiCodeBlock` content overlapping with control buttons when `whiteSpace` was set to `"pre"` ([#3853](https://github.com/elastic/eui/pull/3853)) +- Fixed `EuiFocusTrap` not applying provided `style` prop ([#3916](https://github.com/elastic/eui/pull/3916)) ## [`28.0.0`](https://github.com/elastic/eui/tree/v28.0.0) diff --git a/package.json b/package.json index 4f170b7299c7..b9c081ac6996 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "react-ace": "^7.0.5", "react-beautiful-dnd": "^13.0.0", "react-dropzone": "^10.2.1", - "react-focus-on": "^3.4.1", + "react-focus-on": "^3.5.0", "react-input-autosize": "^2.2.2", "react-is": "~16.3.0", "react-virtualized-auto-sizer": "^1.0.2", diff --git a/src/components/focus_trap/__snapshots__/focus_trap.test.tsx.snap b/src/components/focus_trap/__snapshots__/focus_trap.test.tsx.snap index a7d8850f901d..92691319f29b 100644 --- a/src/components/focus_trap/__snapshots__/focus_trap.test.tsx.snap +++ b/src/components/focus_trap/__snapshots__/focus_trap.test.tsx.snap @@ -1,5 +1,32 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`EuiFocusTrap accepts className and style 1`] = ` +Array [ +
, +
, +
+
+
, +
, +] +`; + exports[`EuiFocusTrap can be disabled 1`] = ` Array [
{ expect(component).toMatchSnapshot(); }); + test('accepts className and style', () => { + const component = render( + +
+ + ); + + expect(component).toMatchSnapshot(); + }); + describe('behavior', () => { describe('focus', () => { test('is set on the first focusable element by default', () => { diff --git a/yarn.lock b/yarn.lock index 128449876396..390176798808 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14290,14 +14290,14 @@ react-focus-lock@^2.3.1: use-callback-ref "^1.2.1" use-sidecar "^1.0.1" -react-focus-on@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/react-focus-on/-/react-focus-on-3.4.1.tgz#e184f3c44185e341598c5d9d44b2987ad459b240" - integrity sha512-KGRIl0iAu+1k1dcX7eQCXF5ZR/nl+XyXN5Ukw/OY80vLaK2b6vDzNqnX0HdYbY5xSUhIRUvMWEzSsdEyPjvk/Q== +react-focus-on@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/react-focus-on/-/react-focus-on-3.5.0.tgz#3cdebbefee26a083976e1700ba75f7377040f7f1" + integrity sha512-RqGAHOxhRAaMSVHIN5IpY7YL6AJkD/DMa/+iPDV7aB6XWRQfg3v2q35egIZgMWP2xhXaRVai3B80dpVWyj4Rcw== dependencies: aria-hidden "^1.1.1" react-focus-lock "^2.3.1" - react-remove-scroll "^2.3.0" + react-remove-scroll "^2.4.0" react-style-singleton "^2.1.0" use-callback-ref "^1.2.3" use-sidecar "^1.0.1" @@ -14373,10 +14373,10 @@ react-remove-scroll-bar@^2.1.0: react-style-singleton "^2.1.0" tslib "^1.0.0" -react-remove-scroll@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.3.0.tgz#3af06fe2f7130500704b676cdef94452c08fe593" - integrity sha512-UqVimLeAe+5EHXKfsca081hAkzg3WuDmoT9cayjBegd6UZVhlTEchleNp9J4TMGkb/ftLve7ARB5Wph+HJ7A5g== +react-remove-scroll@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.4.0.tgz#190c16eb508c5927595935499e8f5dd9ab0e75cf" + integrity sha512-BZIO3GaEs0Or1OhA5C//n1ibUP1HdjJmqUVUsOCMxwoIpaCocbB9TFKwHOkBa/nyYy3slirqXeiPYGwdSDiseA== dependencies: react-remove-scroll-bar "^2.1.0" react-style-singleton "^2.1.0"