[ARVADOS-WORKBENCH2] updated: 1.2.0-459-g4b8b1d2

Git user git at public.curoverse.com
Wed Sep 26 14:57:32 EDT 2018


Summary of changes:
 src/store/context-menu/context-menu-actions.ts | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

       via  4b8b1d2a1cd72a011574f176ba17b12536558d35 (commit)
      from  b595915f605850d59c39da9b2c75555cd3965a3b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 4b8b1d2a1cd72a011574f176ba17b12536558d35
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Wed Sep 26 20:57:14 2018 +0200

    Fix incorrect context menu position after opening via enter key
    
    refs #14222
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/store/context-menu/context-menu-actions.ts b/src/store/context-menu/context-menu-actions.ts
index d85059d..3ae79db 100644
--- a/src/store/context-menu/context-menu-actions.ts
+++ b/src/store/context-menu/context-menu-actions.ts
@@ -31,13 +31,18 @@ export type ContextMenuResource = {
     menuKind: ContextMenuKind;
     isTrashed?: boolean;
 };
-
+export const isKeyboardClick = (event: React.MouseEvent<HTMLElement>) =>
+    event.nativeEvent.detail === 0;
 export const openContextMenu = (event: React.MouseEvent<HTMLElement>, resource: ContextMenuResource) =>
     (dispatch: Dispatch) => {
         event.preventDefault();
+        const { left, top } = event.currentTarget.getBoundingClientRect();
         dispatch(
             contextMenuActions.OPEN_CONTEXT_MENU({
-                position: { x: event.clientX, y: event.clientY },
+                position: {
+                    x: event.clientX || left,
+                    y: event.clientY || top,
+                },
                 resource
             })
         );

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list