diff --git a/src/addon/web/global_card.js b/src/addon/web/global_card.js index c423cb8..1624eb8 100644 --- a/src/addon/web/global_card.js +++ b/src/addon/web/global_card.js @@ -108,9 +108,9 @@ } } - const qEl = document.getElementById('qa'); - qEl?.setAttribute('data-efdrc-editing', 'true'); - + const qEl = document.getElementById('qa') + qEl?.setAttribute('data-efdrc-editing', 'true') + const fld = target.getAttribute('data-EFDRCfield') window.pycmd('EFDRC!focuson#' + fld) } @@ -124,8 +124,8 @@ delete window.invokeTooltipAtSelectedElm2 } - const qEl = document.getElementById('qa'); - qEl?.removeAttribute('data-efdrc-editing'); + const qEl = document.getElementById('qa') + qEl?.removeAttribute('data-efdrc-editing') const el = target if (EFDRC.CONF.remove_span) { @@ -283,7 +283,7 @@ // Set 'data-EFDRC-ctrl' attribute on '#q' element // which is reset when card or side changes. // It can be used for styling in note type templates - const qEl = document.getElementById('qa'); + const qEl = document.getElementById('qa') qEl?.setAttribute('data-efdrc-ctrl', 'true') const els = document.querySelectorAll('[data-EFDRCfield]') @@ -297,7 +297,7 @@ EFDRC.ctrlup = function () { if (EFDRC.CONF.ctrl_click) { - const qEl = document.getElementById('qa'); + const qEl = document.getElementById('qa') qEl?.removeAttribute('data-efdrc-ctrl') const els = document.querySelectorAll('[data-EFDRCfield]')