From 447a9d0f34fa8abfee29fa1021018eb6f756ba11 Mon Sep 17 00:00:00 2001 From: Alan Ren Date: Tue, 14 Feb 2023 18:19:40 -0800 Subject: [PATCH] fix the find widget hide issue (#21937) --- .../workbench/contrib/profiler/browser/profilerFindWidget.ts | 3 +++ .../workbench/contrib/profiler/browser/profilerTableEditor.ts | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sql/workbench/contrib/profiler/browser/profilerFindWidget.ts b/src/sql/workbench/contrib/profiler/browser/profilerFindWidget.ts index 388b45e0a8..76539dbd97 100644 --- a/src/sql/workbench/contrib/profiler/browser/profilerFindWidget.ts +++ b/src/sql/workbench/contrib/profiler/browser/profilerFindWidget.ts @@ -262,6 +262,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL setTimeout(() => { this._domNode.classList.add('visible'); this._domNode.setAttribute('aria-hidden', 'false'); + this._domNode.style.display = ''; if (!animate) { this._domNode.classList.add('noanimation'); setTimeout(() => { @@ -281,6 +282,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL this._domNode.classList.remove('visible'); this._domNode.setAttribute('aria-hidden', 'true'); + this._domNode.style.display = 'none'; if (focusTheEditor) { this._tableController.focus(); } @@ -471,6 +473,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL this._domNode = document.createElement('div'); this._domNode.className = 'editor-widget find-widget'; this._domNode.setAttribute('aria-hidden', 'true'); + this._domNode.style.display = 'none'; this._domNode.appendChild(findPart); diff --git a/src/sql/workbench/contrib/profiler/browser/profilerTableEditor.ts b/src/sql/workbench/contrib/profiler/browser/profilerTableEditor.ts index e0894e15b0..ccec95895b 100644 --- a/src/sql/workbench/contrib/profiler/browser/profilerTableEditor.ts +++ b/src/sql/workbench/contrib/profiler/browser/profilerTableEditor.ts @@ -255,11 +255,9 @@ export class ProfilerTableEditor extends EditorPane implements IProfilerControll if (e.isRevealed) { if (this._findState.isRevealed) { node.style.top = '0px'; - node.style.display = ''; this._updateFinderMatchState(); } else { node.style.top = ''; - node.style.display = 'none'; } }