summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2016-08-01 15:49:50 +0200
committerFlorian Bruhin <git@the-compiler.org>2016-08-02 10:46:23 +0200
commitf982402526bfe30bd30c53dfff6a486c81f9202c (patch)
tree2ff0f39b4fedb83f6ef30d0adca2f60a1a3f495a
parent6a6e7ecb3842005ae2d0a95b4fcf41a10718569f (diff)
downloadqutebrowser-f982402526bfe30bd30c53dfff6a486c81f9202c.tar.gz
qutebrowser-f982402526bfe30bd30c53dfff6a486c81f9202c.zip
Consider input elements without type for hinting
-rw-r--r--qutebrowser/browser/webkit/webelem.py3
-rw-r--r--tests/end2end/data/hints/input.html11
-rw-r--r--tests/end2end/features/hints.feature9
3 files changed, 22 insertions, 1 deletions
diff --git a/qutebrowser/browser/webkit/webelem.py b/qutebrowser/browser/webkit/webelem.py
index 97210bebd..0731904b7 100644
--- a/qutebrowser/browser/webkit/webelem.py
+++ b/qutebrowser/browser/webkit/webelem.py
@@ -52,7 +52,8 @@ SELECTORS = {
Group.focus: '*:focus',
Group.inputs: ('input[type=text], input[type=email], input[type=url], '
'input[type=tel], input[type=number], '
- 'input[type=password], input[type=search], textarea'),
+ 'input[type=password], input[type=search], '
+ 'input:not([type]), textarea'),
}
diff --git a/tests/end2end/data/hints/input.html b/tests/end2end/data/hints/input.html
new file mode 100644
index 000000000..87cc3b347
--- /dev/null
+++ b/tests/end2end/data/hints/input.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Simple input</title>
+ </head>
+ <body>
+ <form><input></input></form>
+ </body>
+</html>
diff --git a/tests/end2end/features/hints.feature b/tests/end2end/features/hints.feature
index 1aa4cb53b..341bbaa96 100644
--- a/tests/end2end/features/hints.feature
+++ b/tests/end2end/features/hints.feature
@@ -119,6 +119,15 @@ Feature: Using hints
And I run :follow-hint a
Then the error "Invalid link clicked - *" should be shown
+ Scenario: Hinting inputs without type
+ When I open data/hints/input.html
+ And I run :hint inputs
+ And I run :follow-hint a
+ And I wait for "Entering mode KeyMode.insert (reason: click)" in the log
+ And I run :leave-mode
+ # The actual check is already done above
+ Then no crash should happen
+
### iframes
Scenario: Using :follow-hint inside an iframe