Skip to content

Commit c9d4e1a

Browse files
committed
fix: force focus on click or mouse over
1 parent 04382cc commit c9d4e1a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/MainLayout/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export default ({
6868
})
6969

7070
const isAVideoFrame = activeImage && activeImage.frameTime !== undefined
71+
const innerContainerRef = useRef()
7172

7273
let impliedVideoRegions = useImpliedVideoRegions(state)
7374

@@ -81,6 +82,14 @@ export default ({
8182
}}
8283
>
8384
<div
85+
ref={innerContainerRef}
86+
tabIndex={-1}
87+
onMouseOver={(e) => {
88+
if (innerContainerRef.current) innerContainerRef.current.focus()
89+
}}
90+
onMouseDown={(e) => {
91+
if (innerContainerRef.current) innerContainerRef.current.focus()
92+
}}
8493
className={classnames(
8594
classes.container,
8695
state.fullScreen && "Fullscreen"

src/ShortcutsManager/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default ({ children, dispatch }) => {
5454
select_tool: () => {
5555
dispatch({
5656
type: "SELECT_TOOL",
57-
selectedTool: "select-tool",
57+
selectedTool: "select",
5858
})
5959
},
6060
zoom_tool: () => {

0 commit comments

Comments
 (0)