From 99b5dba6ddd8bd27f59b2f0e5b11e970bb2b7d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Thu, 14 Apr 2022 21:37:58 +0200 Subject: [PATCH] Fix Enter to enter insert mode --- assets/js/hooks/session.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/js/hooks/session.js b/assets/js/hooks/session.js index 8df7d745b..b236e1270 100644 --- a/assets/js/hooks/session.js +++ b/assets/js/hooks/session.js @@ -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()) {