diff options
| -rw-r--r-- | content_scripts/link_hints.coffee | 2 | ||||
| -rw-r--r-- | tests/dom_tests/dom_tests.coffee | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 02b8d656..0014e20a 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -394,7 +394,7 @@ class LinkHintsMode clickActivator = (modifiers) -> (link) -> DomUtils.simulateClick link, modifiers linkActivator = @mode.linkActivator ? clickActivator @mode.clickModifiers # TODO: Are there any other input elements which should not receive focus? - if clickEl.nodeName.toLowerCase() == "input" and clickEl.type not in ["button", "submit"] + if clickEl.nodeName.toLowerCase() in ["input", "select"] and clickEl.type not in ["button", "submit"] clickEl.focus() linkActivator clickEl diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee index eab47546..68611230 100644 --- a/tests/dom_tests/dom_tests.coffee +++ b/tests/dom_tests/dom_tests.coffee @@ -188,6 +188,11 @@ context "Test link hints for focusing input elements correctly", testDiv.appendChild input inputs.push input + # manually add the select element to test focus + input = document.createElement "select" + testDiv.appendChild input + inputs.push input + tearDown -> document.getElementById("test-div").innerHTML = "" |
