Aleksander Machniak
2013-05-24 cb34c1b52449b229b77483527e2029271e18b29c
program/js/common.js
@@ -298,8 +298,7 @@
  if (!this._events[evt])
    this._events[evt] = [];
  var e = {func:func, obj:obj ? obj : window};
  this._events[evt][this._events[evt].length] = e;
  this._events[evt].push({func:func, obj:obj ? obj : window});
},
/**
@@ -717,7 +716,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 +741,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();
    }
  });
};