From dc336469716000a54865fc59cd2790534e68a848 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 04 Jul 2013 06:20:00 -0400
Subject: [PATCH] Remove sqlite 2.x requirement

---
 program/js/common.js |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/program/js/common.js b/program/js/common.js
index 7ad1891..f7c0a75 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -717,7 +717,7 @@
 // jQuery plugin to emulate HTML5 placeholder attributes on input elements
 jQuery.fn.placeholder = function(text) {
   return this.each(function() {
-    var elem = $(this);
+    var active = false, elem = $(this);
     this.title = text;
 
     // Try HTML5 placeholder attribute first
@@ -742,13 +742,10 @@
         elem[(active ? 'addClass' : 'removeClass')]('placeholder').attr('spellcheck', active);
       });
 
-      // Do not blur currently focused element
-      // Catch "unspecified error" in IE9 (#1489008)
-      try {
-        if (this != document.activeElement)
-          elem.blur();
-      }
-      catch(e) {}
+      // Do not blur currently focused element (catch exception: #1489008)
+      try { active = this == document.activeElement; } catch(e) {}
+      if (!active)
+        elem.blur();
     }
   });
 };

--
Gitblit v1.9.1