diff options
| -rw-r--r-- | CREDITS | 1 | ||||
| -rw-r--r-- | content_scripts/link_hints.coffee | 2 | ||||
| -rw-r--r-- | tests/dom_tests/dom_tests.coffee | 5 | 
3 files changed, 7 insertions, 1 deletions
| @@ -48,5 +48,6 @@ Contributors:    Scott Pinkelman <scott@scottpinkelman.com> (github: sco-tt)    Darryl Pogue <darryl@dpogue.ca> (github: dpogue)    tobimensch +  Ramiro Araujo <rama.araujo@gmail.com> (github: ramiroaraujo)  Feel free to add real names in addition to GitHub usernames. 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..9088fe30 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 also a select element to test focus. +    input = document.createElement "select" +    testDiv.appendChild input +    inputs.push input +    tearDown ->      document.getElementById("test-div").innerHTML = "" | 
