diff options
Diffstat (limited to 'examples/data')
-rw-r--r-- | examples/data/scripts/follow.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index ced13aa..aa4ed72 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -135,9 +135,8 @@ uzbl.follow.generateHint = function(doc, el, label, top, left) { // but at least set the href of the link. (needs some improvements) uzbl.follow.clickElem = function(item) { if(!item) return; - var name = item.tagName; - if (name == 'INPUT') { + if (item instanceof HTMLInputElement) { var type = item.type; if (type == 'text' || type == 'file' || type == 'password') { item.focus(); @@ -145,7 +144,7 @@ uzbl.follow.clickElem = function(item) { return "XXXEMIT_FORM_ACTIVEXXX"; } // otherwise fall through to a simulated mouseclick. - } else if (name == 'TEXTAREA' || name == 'SELECT') { + } else if (item instanceof HTMLTextAreaElement || item instanceof HTMLSelectElement) { item.focus(); item.select(); return "XXXEMIT_FORM_ACTIVEXXX"; |