Disable block highlights when settings are showed
[MAILPOET-1974]
This commit is contained in:
@@ -31,6 +31,10 @@ var EditorApplication = Marionette.Application.extend({
|
||||
return Radio.channel(channel);
|
||||
},
|
||||
|
||||
getShowedSettingsId: function getShowedSettingsId() {
|
||||
return this.showedSettingsId;
|
||||
},
|
||||
|
||||
setShowedSettingsId: function setShowedSettingsId(id) {
|
||||
this.showedSettingsId = id;
|
||||
},
|
||||
|
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
import Marionette from 'backbone.marionette';
|
||||
import BL from 'newsletter_editor/behaviors/BehaviorsLookup';
|
||||
import App from 'newsletter_editor/App';
|
||||
import { isEventInsideElement } from 'newsletter_editor/utils';
|
||||
|
||||
BL.HighlightEditingBehavior = Marionette.Behavior.extend({
|
||||
@@ -24,6 +25,10 @@ BL.HighlightEditingBehavior = Marionette.Behavior.extend({
|
||||
if (mouseEvent && mouseEvent.buttons > 0) {
|
||||
return;
|
||||
}
|
||||
// Ignore mouse events when settings panel is showed
|
||||
if (App.getShowedSettingsId()) {
|
||||
return;
|
||||
}
|
||||
this.view.addHighlight();
|
||||
},
|
||||
onMouseLeave: function onMouseLeave() {
|
||||
|
Reference in New Issue
Block a user