diff --git a/src/ui/components/DashKit/plugins/DebugInfoTool/DebugInfoTool.scss b/src/ui/components/DashKit/plugins/DebugInfoTool/DebugInfoTool.scss index 41f3607a24..ba87ef1633 100644 --- a/src/ui/components/DashKit/plugins/DebugInfoTool/DebugInfoTool.scss +++ b/src/ui/components/DashKit/plugins/DebugInfoTool/DebugInfoTool.scss @@ -3,7 +3,7 @@ background: var(--g-color-base-background); border: 1px dotted var(--g-color-line-misc); padding: 0 3px; - z-index: 99; + z-index: 96; display: inline-block; width: fit-content; position: absolute; diff --git a/src/ui/components/MobileTocToggle/MobileTocToggle.scss b/src/ui/components/MobileTocToggle/MobileTocToggle.scss index f5c10b87f0..e2dae709a4 100644 --- a/src/ui/components/MobileTocToggle/MobileTocToggle.scss +++ b/src/ui/components/MobileTocToggle/MobileTocToggle.scss @@ -13,5 +13,5 @@ background: var(--g-color-base-background); position: sticky; top: 0; - z-index: 101; + z-index: 97; } diff --git a/src/ui/components/Widgets/Chart/ChartWidgetWithProvider.tsx b/src/ui/components/Widgets/Chart/ChartWidgetWithProvider.tsx index 0a705dd256..0065e08a6a 100644 --- a/src/ui/components/Widgets/Chart/ChartWidgetWithProvider.tsx +++ b/src/ui/components/Widgets/Chart/ChartWidgetWithProvider.tsx @@ -44,12 +44,19 @@ export class ChartWrapper extends React.Component {...this.props} dataProvider={this.dataProvider} ignoreUsedParams={true} + key="chart" /> ); } if (isSelectorType(this.props)) { - return ; + return ( + + ); } const props = this.props as ChartWidgetProviderPropsWithRefProps; @@ -58,6 +65,7 @@ export class ChartWrapper extends React.Component {...props} dataProvider={this.dataProvider} compactLoader={true} + key="widget" /> ); } diff --git a/src/ui/components/Widgets/Chart/hooks/useLoadingChartWidget.ts b/src/ui/components/Widgets/Chart/hooks/useLoadingChartWidget.ts index 7623ca9544..1a6736ad01 100644 --- a/src/ui/components/Widgets/Chart/hooks/useLoadingChartWidget.ts +++ b/src/ui/components/Widgets/Chart/hooks/useLoadingChartWidget.ts @@ -117,7 +117,6 @@ export const useLoadingChartWidget = (props: LoadingChartWidgetHookProps) => { const [loadedDescription, setLoadedDescription] = React.useState(null); const [description, setDescription] = React.useState(null); - const [scrollOffset, setScrollOffset] = React.useState(null); const [loadedWidgetType, setLoadedWidgetType] = React.useState(''); const [isLoadedWidgetWizard, setIsLoadedWidgetWizard] = React.useState(false); const [isRendered, setIsRendered] = React.useState(false); @@ -301,10 +300,8 @@ export const useLoadingChartWidget = (props: LoadingChartWidgetHookProps) => { const handleToggleFullscreenMode = React.useCallback(() => { const searchParams = new URLSearchParams(history.location.search); const isFullscreenNewMode = !searchParams.has(FOCUSED_WIDGET_PARAM_NAME); - const scrollHeight = isFullscreenNewMode ? window.scrollY : null; if (isFullscreenNewMode) { - setScrollOffset(scrollHeight); searchParams.set(FOCUSED_WIDGET_PARAM_NAME, widgetId); } else { searchParams.delete(FOCUSED_WIDGET_PARAM_NAME); @@ -415,16 +412,6 @@ export const useLoadingChartWidget = (props: LoadingChartWidgetHookProps) => { handleChartkitReflow(); }, [loadedDescription, description, handleChartkitReflow]); - /** - * updating window position on change fullscreen mode (for mob version) - */ - React.useLayoutEffect(() => { - if (!isFullscreen && scrollOffset !== null) { - window.scrollTo(0, scrollOffset || 0); - setScrollOffset(null); - } - }, [scrollOffset, isFullscreen]); - /** * handle changed chart tab */