// bug report: https://code.google.com/p/chromium/issues/detail?id=335955
// based upon the idea: http://www.neotericdesign.com/blog/2013/3/working-around-chrome-s-contenteditable-span-bug
var $fixWebKit = (function() {
+ var $removedSpan = false;
+
this.$editor.find('span').each(function() {
var $span = $(this);
if ($span.data('verified') !== 'redactor') {
$helper.remove();
$span.remove();
+
+ $removedSpan = true;
}
});
+
+ if ($removedSpan) {
+ this.wmonkeypatch.saveSelection();
+ }
}).bind(this);
// insert.html
$mpHtml.call(this, html, clean);
+ this.wmonkeypatch.saveSelection();
+
if ($isWebKit) {
setTimeout(function() {
$fixWebKit();
return;
}
- $autosaveNotice.data('callbackOpen', function() {
- setTimeout(function() {
- $autosaveNotice.removeClass('open');
- }, 3000);
- });
+ setTimeout(function() {
+ $autosaveNotice.removeClass('open');
+ }, 2000);
$message = WCF.Language.get('wcf.message.autosave.saved');
break;