Fix Enter to enter insert mode

This commit is contained in:
Jonatan Kłosko 2022-04-14 21:37:58 +02:00
parent ae870dc09f
commit 99b5dba6dd

View file

@ -357,7 +357,11 @@ const Session = {
this.showShortcuts();
} else if (
keyBuffer.tryMatch(["i"]) ||
(event.target === document.body && this.focusedId && key === "Enter")
(event.target.matches(
`body, [data-el-cell-body], [data-el-heading], [data-focusable-id]`
) &&
this.focusedId &&
key === "Enter")
) {
cancelEvent(event);
if (this.isInsertModeAvailable()) {