Aleksander Machniak
2013-03-22 39f40104f06cdcd9b8153b9fa4a32e5a7686bbb2
Fix javascript error in IE9 when loading form with placeholders into an iframe (#1489008)
2 files modified
14 ■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/js/common.js 13 ●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix javascript error in IE9 when loading form with placeholders into an iframe (#1489008)
- Fix handling of some conditional comment tags in HTML message (#1489004)
- Add rel="noreferrer" for links in displayed messages (#1484686)
- Fix so forward as attachment works if additional attachment is added by message_compose hook (#1489000)
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,9 +742,14 @@
        elem[(active ? 'addClass' : 'removeClass')]('placeholder').attr('spellcheck', active);
      });
      if (this != document.activeElement) // Do not blur currently focused element
      // Do not blur currently focused element
      // Catch "unspecified error" in IE9 (#1489008)
      try {
        if (this != document.activeElement)
        elem.blur();
    }
      catch(e) {}
    }
  });
};