Skip to content
Snippets Groups Projects
Commit 05cfaa6b authored by gnaegi's avatar gnaegi
Browse files

OO-816 fix wrong usage of periodic executor, was never stopped and caused...

OO-816 fix wrong usage of periodic executor, was never stopped and caused o2c=1 side effects randomly when a tiny editor was displayed
parent be3c1edd
No related branches found
No related tags found
No related merge requests found
......@@ -43,11 +43,12 @@
}
## Check for dirtyness and mark buttons accordingly, each second
jQuery.periodic({period: 1000, decay:1.0, max_period: Number.MAX_VALUE}, function(executor) {
jQuery.periodic({period: 1000, decay:1.0, max_period: Number.MAX_VALUE}, function() {
var executor = this;
## first check if the html editor still exists on this page, otherwhise stop executing this code
var elem = jQuery('#$f.getItemId("rtfElement")');
if (!elem) {
executor.stop();
if (elem.length == 0) {
executor.cancel();
} else if (tinyMCE && tinyMCE.activeEditor) {
if (tinyMCE.activeEditor.isDirty()) {
o2c=1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment