Disable block highlights when settings are showed

[MAILPOET-1974]
This commit is contained in:
Ján Mikláš
2019-05-02 13:32:30 +02:00
committed by M. Shull
parent 970e835ddc
commit d735adddd4
2 changed files with 9 additions and 0 deletions

View File

@@ -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;
},

View File

@@ -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() {