From a3018dc522d6cf3baeccd0b776e6cdebda979a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Mon, 4 Apr 2022 17:07:16 +0200 Subject: [PATCH] Fix element type check on shortcut actions --- assets/js/hooks/session.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/hooks/session.js b/assets/js/hooks/session.js index 7b52a4768..a5ece8a33 100644 --- a/assets/js/hooks/session.js +++ b/assets/js/hooks/session.js @@ -1064,17 +1064,17 @@ const Session = { isCell(focusableId) { const el = this.getFocusableEl(focusableId); - return el.dataset.element === "cell"; + return el.hasAttribute("data-el-cell"); }, isSection(focusableId) { const el = this.getFocusableEl(focusableId); - return el.dataset.element === "section-headline"; + return el.hasAttribute("data-el-section-headline"); }, isNotebook(focusableId) { const el = this.getFocusableEl(focusableId); - return el.dataset.element === "notebook-headline"; + return el.hasAttribute("data-el-notebook-headline"); }, getFocusableEl(focusableId) {