aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content_scripts/link_hints.coffee6
-rw-r--r--content_scripts/scroller.coffee9
-rw-r--r--pages/options.html5
3 files changed, 12 insertions, 8 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index f2fb7c19..1e4670dd 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -249,17 +249,13 @@ class LinkHintsMode
when "Control"
@setOpenLinkMode(if @mode is OPEN_IN_NEW_FG_TAB then OPEN_IN_NEW_BG_TAB else OPEN_IN_NEW_FG_TAB)
- handlerId = handlerStack.push
+ handlerId = @hintMode.push
keyup: (event) =>
if event.key == key
handlerStack.remove()
@setOpenLinkMode previousMode
true # Continue bubbling the event.
- # For some (unknown) reason, we don't always receive the keyup event needed to remove this handler.
- # Therefore, we ensure that it's always removed when hint mode exits. See #1911 and #1926.
- @hintMode.onExit -> handlerStack.remove handlerId
-
else if KeyboardUtils.isBackspace event
if @markerMatcher.popKeyChar()
@updateVisibleMarkers()
diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee
index 4a6c7edf..f65062e4 100644
--- a/content_scripts/scroller.coffee
+++ b/content_scripts/scroller.coffee
@@ -95,7 +95,14 @@ findScrollableElement = (element, direction, amount, factor) ->
# On some pages, the scrolling element is not actually scrollable. Here, we search the document for the
# largest visible element which does scroll vertically. This is used to initialize activatedElement. See
# #1358.
-firstScrollableElement = (element=getScrollingElement()) ->
+firstScrollableElement = (element = null) ->
+ unless element
+ scrollingElement = getScrollingElement()
+ if doesScroll(scrollingElement, "y", 1, 1) or doesScroll(scrollingElement, "y", -1, 1)
+ return scrollingElement
+ else
+ element = document.body ? getScrollingElement()
+
if doesScroll(element, "y", 1, 1) or doesScroll(element, "y", -1, 1)
element
else
diff --git a/pages/options.html b/pages/options.html
index 650a129c..b118bbd9 100644
--- a/pages/options.html
+++ b/pages/options.html
@@ -272,11 +272,12 @@ b: http://b.com/?q=%s description
</td>
</tr>
<tr>
- <td class="caption">CSS for link hints</td>
+ <td class="caption">CSS for Vimium UI</td>
<td verticalAlign="top">
<div class="help">
<div class="example">
- The CSS used to style the characters next to each link hint.<br/><br/>
+ These styles are applied to link hints, the Vomnibar, the help dialog, the exclusions pop-up and the HUD.<br />
+ By default, this CSS is used to style the characters next to each link hint.<br/><br/>
These styles are used in addition to and take precedence over Vimium's
default styles.
</div>