docs: function(element) {
      if (element.setActive) {
        // Following line could cause a js error when the textarea is invisible
        // See https://github.com/xing/wysihtml5/issues/9
        try { element.setActive(); } catch(e) {}
      } else {
        var elementStyle = element.style,
            originalScrollTop = doc.documentElement.scrollTop || doc.body.scrollTop,
            originalScrollLeft = doc.documentElement.scrollLeft || doc.body.scrollLeft,
            originalStyles = {
              position:         elementStyle.position,
              top:              elementStyle.top,
              left:             elementStyle.left,
              WebkitUserSelect: elementStyle.WebkitUserSelect
            };
  
        dom.setStyles({
          position:         "absolute",
          top:              "-99999px",
          left:             "-99999px",
          // Don't ask why but temporarily setting -webkit-user-select to none makes the whole thing performing smoother
          WebkitUserSelect: "none"
        }).on(element);
  
        element.focus();
  
        dom.setStyles(originalStyles).on(element);
  
        if (win.scrollTo) {
          // Some browser extensions unset this method to prevent annoyances
          // "Better PopUp Blocker" for Chrome http://code.google.com/p/betterpopupblocker/source/browse/trunk/blockStart.js#100
          // Issue: http://code.google.com/p/betterpopupblocker/issues/detail?id=1
          win.scrollTo(originalScrollLeft, originalScrollTop);
        }
      }
    }