diff options
| -rw-r--r-- | lib/domUtils.js | 7 | ||||
| -rw-r--r-- | linkHints.js | 2 | ||||
| -rw-r--r-- | vimium.css | 3 |
3 files changed, 7 insertions, 5 deletions
diff --git a/lib/domUtils.js b/lib/domUtils.js index 06bffa42..4ab92682 100644 --- a/lib/domUtils.js +++ b/lib/domUtils.js @@ -105,16 +105,17 @@ var domUtils = { } }, - // momentarily flash a border around an element to give user some visual feedback - flashElement: function(element, rect) { + // momentarily flash a rectangular border to give user some visual feedback + flashRect: function(rect) { var flashEl = document.createElement("div"); flashEl.id = "vimiumFlash"; + flashEl.className = "vimiumReset"; flashEl.style.left = rect.left + window.scrollX + "px"; flashEl.style.top = rect.top + window.scrollY + "px"; flashEl.style.width = rect.width + "px"; flashEl.style.height = rect.height + "px"; document.body.appendChild(flashEl); - setTimeout(function() { flashEl.parentNode.removeChild(flashEl); delete flashEl; }, 400); + setTimeout(function() { flashEl.parentNode.removeChild(flashEl); }, 400); }, }; diff --git a/linkHints.js b/linkHints.js index 8f91264c..7d6b431f 100644 --- a/linkHints.js +++ b/linkHints.js @@ -207,7 +207,7 @@ var linkHints = { // TODO figure out which other input elements should not receive focus if (clickEl.nodeName.toLowerCase() === 'input' && clickEl.type !== 'button') clickEl.focus(); - domUtils.flashElement(clickEl, matchedLink.rect); + domUtils.flashRect(matchedLink.rect); this.linkActivator(clickEl); if (this.shouldOpenWithQueue) { this.deactivateMode(delay, function() { @@ -381,8 +381,9 @@ body.vimiumFindMode ::selection { width: 90% !important; } -#vimiumFlash { +div#vimiumFlash { box-shadow: 0px 0px 4px 2px #4183C4; + padding: 1px; background: transparent; position: absolute; z-index: 99999; |
