From e153b36b8e23d5a43376eab758b804dac69ede8f Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 10 Nov 2010 11:41:17 -0500 Subject: [PATCH] Work around the Panorama devs' apathy. Update issue #132 ... --- common/content/dactyl.js | 12 +++++++----- common/content/dactyl.xul | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index dc6669af..088a4504 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -139,11 +139,13 @@ const Dactyl = Module("dactyl", { beep: requiresMainThread(function () { if (options["visualbell"]) { // flash the visual bell - let popup = document.getElementById("dactyl-deck-bell"); - if (popup) { - let restore = popup.parentNode.selectedPanel; - popup.parentNode.selectedPanel = popup; - util.timeout(function () { popup.parentNode.selectedPanel = restore; }, 20); + 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"); diff --git a/common/content/dactyl.xul b/common/content/dactyl.xul index 636b5a91..59c78d92 100644 --- a/common/content/dactyl.xul +++ b/common/content/dactyl.xul @@ -51,9 +51,11 @@ oncommandupdate="&events;.onSelectionChange(event);"/> +