Hide settings on click outside email content
[MAILPOET-1974]
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Marionette from 'backbone.marionette';
|
||||
import BackboneRadio from 'backbone.radio';
|
||||
import jQuery from 'jquery';
|
||||
|
||||
var Radio = BackboneRadio;
|
||||
|
||||
@@ -13,6 +14,17 @@ var AppView = Marionette.View.extend({
|
||||
headingRegion: '#mailpoet_editor_heading',
|
||||
topRegion: '#mailpoet_editor_top',
|
||||
},
|
||||
|
||||
events: {
|
||||
click: 'onClickOutsideContentHideSettings',
|
||||
},
|
||||
|
||||
onClickOutsideContentHideSettings: function onClickOutsideContentHideSettings(event) {
|
||||
if (jQuery(event.target).parents('#mailpoet_editor_content').length) {
|
||||
return;
|
||||
}
|
||||
window.EditorApplication.getChannel().trigger('hideSettings');
|
||||
},
|
||||
});
|
||||
|
||||
var EditorApplication = Marionette.Application.extend({
|
||||
|
Reference in New Issue
Block a user