From 24e88e91f7ebac132fa356762b0cd544d42cef9f Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sun, 24 Mar 2013 12:30:34 -0400 Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail --- program/js/common.js | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/program/js/common.js b/program/js/common.js index f9e945c..1075225 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -720,10 +720,12 @@ var elem = $(this); this.title = text; + // Try HTML5 placeholder attribute first if ('placeholder' in this) { - elem.attr('placeholder', text); // Try HTML5 placeholder attribute first + elem.attr('placeholder', text); } - else { // Fallback to Javascript emulation of placeholder + // Fallback to Javascript emulation of placeholder + else { this._placeholder = text; elem.blur(function(e) { if ($.trim(elem.val()) == "") @@ -740,7 +742,8 @@ elem[(active ? 'addClass' : 'removeClass')]('placeholder').attr('spellcheck', active); }); - if (this != document.activeElement) // Do not blur currently focused element + // Do not blur currently focused element + if (this != document.activeElement) elem.blur(); } }); -- Gitblit v1.9.1