Allow dragging text blocks before activating TinyMCE

This commit is contained in:
Tautvidas Sipavičius
2016-09-22 17:44:43 +03:00
parent 4799882b80
commit 50e134d696
2 changed files with 9 additions and 1 deletions

View File

@@ -70,10 +70,12 @@ define([
});
editor.on('focus', function(e) {
that.disableDragging();
that.disableShowingTools();
});
editor.on('blur', function(e) {
that.enableDragging();
that.enableShowingTools();
});
},
@@ -83,6 +85,12 @@ define([
});
}
},
disableDragging: function() {
this.$('.mailpoet_content').addClass('mailpoet_ignore_drag');
},
enableDragging: function() {
this.$('.mailpoet_content').removeClass('mailpoet_ignore_drag');
},
});
Module.TextBlockToolsView = base.BlockToolsView.extend({