From c71e5dd642981b7fdf2d644b19e73caf0840adae Mon Sep 17 00:00:00 2001 From: keis Date: Sat, 14 May 2011 18:28:10 +0200 Subject: check input field type using type property this field is set even when no type attribute is set on the element --- examples/data/scripts/follow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index 2d65489..ced13aa 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -138,8 +138,8 @@ uzbl.follow.clickElem = function(item) { var name = item.tagName; if (name == 'INPUT') { - var type = item.getAttribute('type').toUpperCase(); - if (type == 'TEXT' || type == 'FILE' || type == 'PASSWORD') { + var type = item.type; + if (type == 'text' || type == 'file' || type == 'password') { item.focus(); item.select(); return "XXXEMIT_FORM_ACTIVEXXX"; -- cgit v1.2.3