diff options
| author | gdh1995 | 2016-09-09 12:53:50 +0800 |
|---|---|---|
| committer | gdh1995 | 2016-09-09 12:58:38 +0800 |
| commit | 953bd8e1dd7d76191b1b60b0febab675d8c06259 (patch) | |
| tree | a939313a61f21d15f6ceabbef5a9c0808d25033b /content_scripts/link_hints.coffee | |
| parent | aa178b03ea1e4d12071751b81be9237428e5a97e (diff) | |
| download | vimium-953bd8e1dd7d76191b1b60b0febab675d8c06259.tar.bz2 | |
hint a label only if its control is not disabled
example:
``` html
<label><input type=checkbox disabled />exlpanation</label>
```
Diffstat (limited to 'content_scripts/link_hints.coffee')
| -rw-r--r-- | content_scripts/link_hints.coffee | 3 |
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 |
