aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormike2012-12-18 23:48:15 -0500
committermike2012-12-18 23:53:10 -0500
commit8cbf15852155575d275cb37ac0092a771342272d (patch)
treedc0622d1e075b25e89b620f30605f916ca7c02bb
parent0a06e935dd8709ea56f565faa5bcc6e9c5ef3808 (diff)
downloadvimium-8cbf15852155575d275cb37ac0092a771342272d.tar.bz2
Fix #464 - Support placeholder attribute for inputs in find mode
Whereas find mode normally identifies inputs by their value, if a value is blank, find mode will use the placeholder value instead, if it exists
-rw-r--r--content_scripts/link_hints.coffee2
1 files changed, 2 insertions, 0 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index 32eb6ad5..1f5e5d05 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -352,6 +352,8 @@ filterHints =
showLinkText = true
else if (element.type != "password")
linkText = element.value
+ if not linkText and 'placeholder' of element
+ linkText = element.placeholder
# check if there is an image embedded in the <a> tag
else if (nodeName == "a" && !element.textContent.trim() &&
element.firstElementChild &&