From f9199078553d4e5290142942c384f4b5f29519c1 Mon Sep 17 00:00:00 2001 From: Kartik Prajapati Date: Tue, 15 Dec 2020 04:29:00 +0530 Subject: [PATCH] Enhance delete button in context menu (#2591) --- src/actions/actionDeleteSelected.tsx | 2 +- src/components/ContextMenu.scss | 14 ++++++++++++++ src/components/ContextMenu.tsx | 8 ++++++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/actions/actionDeleteSelected.tsx b/src/actions/actionDeleteSelected.tsx index b4404ec83..88e014503 100644 --- a/src/actions/actionDeleteSelected.tsx +++ b/src/actions/actionDeleteSelected.tsx @@ -136,7 +136,7 @@ export const actionDeleteSelected = register({ }; }, contextItemLabel: "labels.delete", - contextMenuOrder: 3, + contextMenuOrder: 999999, keyTest: (event) => event.key === KEYS.BACKSPACE || event.key === KEYS.DELETE, PanelComponent: ({ elements, appState, updateData }) => ( { const isDarkTheme = !!document .querySelector(".excalidraw") ?.classList.contains("Appearance_dark"); - return (
{ > {options.map(({ action, shortcutName, label }, idx) => (
  • -