From b665e766e7e1620315e4c4eb9adb1c2da49123e4 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 15 May 2009 01:13:44 +1000 Subject: [PATCH] Fix #208 (Hint on text field doesn't work for some fields) --- common/content/buffer.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 00c06c3d..863e3e9f 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1190,18 +1190,16 @@ function Buffer() //{{{ offsetX = Number(coords[0]) + 1; offsetY = Number(coords[1]) + 1; } - else if (localName == "input" && elem.getAttribute('type').toLowerCase() == "file") + else if (localName == "input" && elem.type.toLowerCase() == "file") { - commandline.input("Upload file: ", function (path) - { - let file = io.getFile(path); + commandline.input("Upload file: ", function (path) { + let file = io.getFile(path); - if (!file.exists()) - return liberator.beep(); + if (!file.exists()) + return liberator.beep(); - elem.value = file.path; - } - , {completer: completion.file, default: elem.value}); + elem.value = file.path; + }, { completer: completion.file, default: elem.value }); return; }