diff options
| author | Stephen Blott | 2016-09-25 16:09:17 +0100 |
|---|---|---|
| committer | Stephen Blott | 2016-09-25 16:09:17 +0100 |
| commit | 1b1b9c25e8b234598ff110dce7bb150f6d886169 (patch) | |
| tree | 096c91692f56f5b9e0a104127fbc5d02ff1727f2 | |
| parent | 91976ed2fc8026d1b688f210e086af764f1f057a (diff) | |
| download | vimium-1b1b9c25e8b234598ff110dce7bb150f6d886169.tar.bz2 | |
Make tab-selected hint visible.
When the user selects an active hint with Tab (for filtered hints),
adjust its z-index such at it is top of the stack.
| -rw-r--r-- | content_scripts/link_hints.coffee | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 69ef79c1..4ae8c459 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -312,7 +312,7 @@ class LinkHintsMode updateKeyState: ({hintKeystrokeQueue, linkTextKeystrokeQueue, tabCount}) -> extend @markerMatcher, {hintKeystrokeQueue, linkTextKeystrokeQueue} - {linksMatched, userMightOverType} = @markerMatcher.getMatchingHints @hintMarkers, tabCount + {linksMatched, userMightOverType} = @markerMatcher.getMatchingHints @hintMarkers, tabCount, this.getNextZIndex.bind this if linksMatched.length == 0 @deactivateMode() else if linksMatched.length == 1 @@ -513,7 +513,7 @@ class FilterHints # strings. This ensures that we always get hint strings in the same order. @filterLinkHints hintMarkers - getMatchingHints: (hintMarkers, tabCount = 0) -> + getMatchingHints: (hintMarkers, tabCount, getNextZIndex) -> # At this point, linkTextKeystrokeQueue and hintKeystrokeQueue have been updated to reflect the latest # input. Use them to filter the link hints accordingly. matchString = @hintKeystrokeQueue.join "" @@ -526,6 +526,7 @@ class FilterHints @activeHintMarker?.classList?.remove "vimiumActiveHintMarker" @activeHintMarker = linksMatched[tabCount] @activeHintMarker?.classList?.add "vimiumActiveHintMarker" + @activeHintMarker.style.zIndex = getNextZIndex() linksMatched: linksMatched userMightOverType: @hintKeystrokeQueue.length == 0 and 0 < @linkTextKeystrokeQueue.length |
