From 214f3a5a66c92340facbcc4cf86ba84e046b730d Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Thu, 11 Nov 2021 17:34:55 +0100 Subject: [PATCH] fixed context menu bug --- libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx | 2 +- .../src/lib/remix-ui-vertical-icons-panel.css | 3 +++ .../src/lib/vertical-icons-context-menu.tsx | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx index 57f994540b..57bfa99f47 100644 --- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx +++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx @@ -81,6 +81,7 @@ function Icon ({ setShowContext(true) } function closeContextMenu () { + console.log('watch me!!!') setShowContext(false) } @@ -106,7 +107,6 @@ function Icon ({ e.stopPropagation() handleContextMenu(e) }} - onBlur={closeContextMenu} data-id={`verticalIconsKind${name}`} id={`verticalIconsKind${name}`} ref={iconRef} diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css index 9ecc517187..ea6bff4269 100644 --- a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css +++ b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css @@ -72,6 +72,9 @@ z-index: 1000; box-shadow: 0 0 4px var(--dark); } + .remixui_verticalIconContextcontainer:focus { + outline: 0; + } .remixui_liitem { padding: 2px; padding-left: 6px; diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx index a0de7fa9b6..1481e6b226 100644 --- a/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx +++ b/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx @@ -62,6 +62,7 @@ function VerticalIconsContextMenu (props: VerticalIconsContextMenuProps) { }} ref={menuRef} + tabIndex={1} >