From d8b33629ef31eb18963bb4418c47883bc0acb2c3 Mon Sep 17 00:00:00 2001 From: Constance Date: Wed, 16 Nov 2022 09:58:53 -0800 Subject: [PATCH] [EuiModal] Permanently fix `EuiModal` to scroll-jumping issues, remove temporary workaround (#6360) * Update react-focus-on * Remove old scroll workaround and use new react-focus-on API * [misc] remove old/outdated comment * changelog * Update snapshot changes (caused by react-focus-on upgrade?) --- package.json | 2 +- .../collapsible_nav.test.tsx.snap | 45 ------ .../__snapshots__/data_grid.test.tsx.snap | 50 ------- .../keyboard_shortcuts.test.tsx.snap | 16 +-- .../flyout/__snapshots__/flyout.test.tsx.snap | 120 ---------------- .../__snapshots__/focus_trap.test.tsx.snap | 15 -- .../__snapshots__/super_select.test.tsx.snap | 40 ------ .../__snapshots__/confirm_modal.test.tsx.snap | 22 --- .../modal/__snapshots__/modal.test.tsx.snap | 16 +-- src/components/modal/modal.test.tsx | 24 ---- src/components/modal/modal.tsx | 27 +--- .../__snapshots__/popover.rtl.test.tsx.snap | 5 - .../__snapshots__/popover.test.tsx.snap | 65 --------- .../__snapshots__/tour_step.test.tsx.snap | 25 ---- upcoming_changelogs/6360.md | 3 + yarn.lock | 129 +++++++++--------- 16 files changed, 76 insertions(+), 528 deletions(-) create mode 100644 upcoming_changelogs/6360.md diff --git a/package.json b/package.json index 5b15efd67ee..e02551433a4 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "react-beautiful-dnd": "^13.1.0", "react-dropzone": "^11.5.3", "react-element-to-jsx-string": "^14.3.4", - "react-focus-on": "^3.5.4", + "react-focus-on": "^3.7.0", "react-input-autosize": "^3.0.0", "react-is": "^17.0.2", "react-virtualized-auto-sizer": "^1.0.6", diff --git a/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap b/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap index 117ec48fcc9..bae474c35c2 100644 --- a/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap +++ b/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap @@ -8,11 +8,6 @@ Array [ style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;" tabindex="0" /> -
@@ -56,11 +51,6 @@ Array [ style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;" tabindex="0" /> -
@@ -103,11 +93,6 @@ Array [ style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;" tabindex="0" />, -
,
@@ -153,11 +138,6 @@ Array [ style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;" tabindex="0" /> -
@@ -199,11 +179,6 @@ Array [ style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;" tabindex="0" /> -
@@ -239,11 +214,6 @@ Array [ exports[`EuiCollapsibleNav props isDocked 1`] = ` Array [ -
,
-
@@ -325,11 +290,6 @@ Array [ style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;" tabindex="-1" />, -
,
@@ -356,11 +316,6 @@ Array [ style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;" tabindex="0" /> -
diff --git a/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap b/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap index 7223dba7ccc..fe51a6c7c16 100644 --- a/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap +++ b/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap @@ -456,11 +456,6 @@ exports[`EuiDataGrid render column actions renders various column actions config exports[`EuiDataGrid rendering renders additional toolbar controls 1`] = ` Array [ -
,
,
-
-
-
-
-
-
,
,
-