From 27e9b4c7cbf76c9f819f30a85f6e24c5aba4548d Mon Sep 17 00:00:00 2001 From: Alexey Morozov Date: Fri, 28 Nov 2025 02:12:53 +0300 Subject: [PATCH] Re-focus on canvas when clicking on selection box --- CHANGELOG.md | 1 + src/widgets/selection.tsx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56d18f4..d3bef35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p #### 🐛 Fixed - Fix `AnnotationSupport` not unsubscribing from `AnnotationTopic` at unmount which causes tow annotations to be created from `SelectionActionAnnotate` in React development mode. - Fix undo/redo history not working after panning or pinch-zoom gesture on touch devices. +- Fix keyboard hotkeys for selection actions not working after focusing on search input then clicking back on the selection box. ## [0.31.1] - 2025-11-18 #### 🐛 Fixed diff --git a/src/widgets/selection.tsx b/src/widgets/selection.tsx index 631fc3b..2520850 100644 --- a/src/widgets/selection.tsx +++ b/src/widgets/selection.tsx @@ -411,6 +411,9 @@ class StatefulMoveController { positions, command: RestoreGeometry.capturePartial(elements, []), }; + // Re-focus on canvas when clicking on the selection box + // to allow keyboard hotkeys for selection actions to work + canvas.focus(); }; private isToggleSelectionEvent(e: React.MouseEvent): boolean {