diff --git a/src/core/public/styles/_base.scss b/src/core/public/styles/_base.scss index de138cdf402e6..1e8e6c7411e4d 100644 --- a/src/core/public/styles/_base.scss +++ b/src/core/public/styles/_base.scss @@ -34,3 +34,12 @@ .euiPageHeader--bottomBorder:not(.euiPageHeader--tabsAtBottom):not([class*='euiPageHeader--padding']) { padding-bottom: $euiSizeL; } + +// Kibana's body ignores the `margin-right !important` set by react-remove-scroll-bar +// (used by EUI's focus trap component & prevents page width jumps on full-screen overlays) +// due to the 100% width/min-width CSS set by Kibana in other places. To work around this, we +// grab the `--removed-body-scroll-bar-size` var added by the library & manually set `padding` +// TODO: Use `gapMode` instead once https://github.com/theKashey/react-focus-on/issues/65 is fixed +.kbnBody { + padding-right: var(--removed-body-scroll-bar-size, 0); +} diff --git a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/customize_panel/customize_panel_action.tsx b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/customize_panel/customize_panel_action.tsx index ec6c2011ca53d..a5d8719b99c99 100644 --- a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/customize_panel/customize_panel_action.tsx +++ b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/customize_panel/customize_panel_action.tsx @@ -129,6 +129,8 @@ export class CustomizePanelAction implements Action { size: 's', 'data-test-subj': 'customizePanel', + // @ts-ignore - TODO: Remove this once https://github.com/elastic/eui/pull/6645 lands in Kibana + focusTrapProps: { scrollLock: true }, } ); overlayTracker?.openOverlay(handle);