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);
|
return Radio.channel(channel);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getShowedSettingsId: function getShowedSettingsId() {
|
||||||
|
return this.showedSettingsId;
|
||||||
|
},
|
||||||
|
|
||||||
setShowedSettingsId: function setShowedSettingsId(id) {
|
setShowedSettingsId: function setShowedSettingsId(id) {
|
||||||
this.showedSettingsId = id;
|
this.showedSettingsId = id;
|
||||||
},
|
},
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
import Marionette from 'backbone.marionette';
|
import Marionette from 'backbone.marionette';
|
||||||
import BL from 'newsletter_editor/behaviors/BehaviorsLookup';
|
import BL from 'newsletter_editor/behaviors/BehaviorsLookup';
|
||||||
|
import App from 'newsletter_editor/App';
|
||||||
import { isEventInsideElement } from 'newsletter_editor/utils';
|
import { isEventInsideElement } from 'newsletter_editor/utils';
|
||||||
|
|
||||||
BL.HighlightEditingBehavior = Marionette.Behavior.extend({
|
BL.HighlightEditingBehavior = Marionette.Behavior.extend({
|
||||||
@@ -24,6 +25,10 @@ BL.HighlightEditingBehavior = Marionette.Behavior.extend({
|
|||||||
if (mouseEvent && mouseEvent.buttons > 0) {
|
if (mouseEvent && mouseEvent.buttons > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Ignore mouse events when settings panel is showed
|
||||||
|
if (App.getShowedSettingsId()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.view.addHighlight();
|
this.view.addHighlight();
|
||||||
},
|
},
|
||||||
onMouseLeave: function onMouseLeave() {
|
onMouseLeave: function onMouseLeave() {
|
||||||
|
Reference in New Issue
Block a user