mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-11 06:32:23 +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);
|
restartRuntime(hook);
|
||||||
} else if (keyBuffer.tryMatch(["?"])) {
|
} else if (keyBuffer.tryMatch(["?"])) {
|
||||||
showShortcuts(hook);
|
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);
|
cancelEvent(event);
|
||||||
enterInsertMode(hook);
|
enterInsertMode(hook);
|
||||||
} else if (keyBuffer.tryMatch(["j"])) {
|
} else if (keyBuffer.tryMatch(["j"])) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue