From 02250922e7b281584075ba57c93ee226b21fcb5f Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Fri, 20 Oct 2023 09:24:01 +0000 Subject: [PATCH] fix: Fixed generic button on focus style coming when focused if we hide/unhide the browser window --- packages/nc-gui/components/nc/Button.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/nc-gui/components/nc/Button.vue b/packages/nc-gui/components/nc/Button.vue index 1c6dc4d548..3a1a68212b 100644 --- a/packages/nc-gui/components/nc/Button.vue +++ b/packages/nc-gui/components/nc/Button.vue @@ -52,10 +52,8 @@ const onFocus = (e: FocusEvent) => { isFocused.value = false } else { const relatedTarget = e.relatedTarget as HTMLElement | null - const focusFromModal = - relatedTarget?.classList?.contains('ant-modal-wrap') || relatedTarget?.classList?.contains('ant-modal-wrap') - isFocused.value = !focusFromModal + isFocused.value = !!relatedTarget } isClicked.value = false