mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-04 06:01:59 +08:00
Fix Enter behaviour on buttons
This commit is contained in:
parent
48b4938408
commit
5637d09c09
1 changed files with 6 additions and 1 deletions
|
@ -306,7 +306,12 @@ function handleDocumentKeyDown(hook, event) {
|
|||
restartRuntime(hook);
|
||||
} else if (keyBuffer.tryMatch(["?"])) {
|
||||
showShortcuts(hook);
|
||||
} else if (keyBuffer.tryMatch(["i"]) || key === "Enter") {
|
||||
} else if (
|
||||
keyBuffer.tryMatch(["i"]) ||
|
||||
(event.target === document.body &&
|
||||
hook.state.focusedCellId &&
|
||||
key === "Enter")
|
||||
) {
|
||||
cancelEvent(event);
|
||||
enterInsertMode(hook);
|
||||
} else if (keyBuffer.tryMatch(["j"])) {
|
||||
|
|
Loading…
Reference in a new issue