aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdh19952016-09-09 12:53:50 +0800
committergdh19952016-09-09 12:58:38 +0800
commit953bd8e1dd7d76191b1b60b0febab675d8c06259 (patch)
treea939313a61f21d15f6ceabbef5a9c0808d25033b
parentaa178b03ea1e4d12071751b81be9237428e5a97e (diff)
downloadvimium-953bd8e1dd7d76191b1b60b0febab675d8c06259.tar.bz2
hint a label only if its control is not disabled
example: ``` html <label><input type=checkbox disabled />exlpanation</label> ```
-rw-r--r--content_scripts/link_hints.coffee3
1 files changed, 2 insertions, 1 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index 0f2425c3..0a6445be 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -621,7 +621,8 @@ LocalHints =
when "button", "select"
isClickable ||= not element.disabled
when "label"
- isClickable ||= element.control? and (@getVisibleClickable element.control).length == 0
+ isClickable ||= element.control? and not element.control.disabled and
+ (@getVisibleClickable element.control).length == 0
when "body"
isClickable ||=
if element == document.body and not windowIsFocused() and