diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 81e0dca5..fb2336d4 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -139,19 +139,21 @@ const Dactyl = Module("dactyl", { */ beep: function () { if (options["visualbell"]) { - // flash the visual bell - let panel = document.getElementById("dactyl-deck-bell"); - if (panel) { - let restore = panel.parentNode.selectedPanel; - if (restore !== panel) { - panel.parentNode.selectedPanel = panel; - util.timeout(function () { panel.parentNode.selectedPanel = restore; }, 20); - } - } - else { - highlight.highlightNode(document.documentElement, "Bell"); - util.timeout(function () { document.documentElement.removeAttributeNS(NS, "highlight"); }, 5); + let bell = document.getElementById("dactyl-bell"); + let strut = document.getElementById("dactyl-bell-strut"); + if (!bell) { + bell = document.documentElement.insertBefore( + util.xmlToDom(