From 86ee5287bf30b0a634075dbe30e0daeded3214ee Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Thu, 24 Sep 2015 01:25:57 +0200 Subject: [PATCH] Fixes #11 Select input text when focus --- templates/partial/lutim.js.ep | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/partial/lutim.js.ep b/templates/partial/lutim.js.ep index 82b1447..1491eb3 100644 --- a/templates/partial/lutim.js.ep +++ b/templates/partial/lutim.js.ep @@ -1,5 +1,8 @@ % # vim:set sw=4 ts=4 sts=4 ft=javascript expandtab: %= javascript begin + function selectInput() { + $(this).select(); + } function tw_url(url) { var btn = '   '; if (navigator.mozSetMessageHandler !== undefined) { @@ -171,6 +174,8 @@ if (data.success) { $('.close').unbind('click', evaluateCopyAll); $('.close').on('click', evaluateCopyAll); + $('input[type=\'text\']').unbind("click", selectInput); + $('input[type=\'text\']').on("click", selectInput); addItem(data.msg); } },