#623 test cases issue fixed
This commit is contained in:
@@ -358,17 +358,18 @@ class EditorStartup {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const liElems = this.$svgEditor.querySelectorAll('button, select, input:not(#text)');
|
const liElems = this.$svgEditor.querySelectorAll('button, select, input:not(#text)');
|
||||||
|
const self = this;
|
||||||
Array.prototype.forEach.call(liElems, function(el){
|
Array.prototype.forEach.call(liElems, function(el){
|
||||||
el.addEventListener("focus", (e) => {
|
el.addEventListener("focus", (e) => {
|
||||||
inp = e.currentTarget;
|
inp = e.currentTarget;
|
||||||
this.uiContext = 'toolbars';
|
self.uiContext = 'toolbars';
|
||||||
this.workarea.addEventListener('mousedown', unfocus);
|
self.workarea.addEventListener('mousedown', unfocus);
|
||||||
});
|
});
|
||||||
el.addEventListener("blur", () => {
|
el.addEventListener("blur", () => {
|
||||||
this.uiContext = 'canvas';
|
self.uiContext = 'canvas';
|
||||||
this.workarea.removeEventListener('mousedown', unfocus);
|
self.workarea.removeEventListener('mousedown', unfocus);
|
||||||
// Go back to selecting text if in textedit mode
|
// Go back to selecting text if in textedit mode
|
||||||
if (this.svgCanvas.getMode() === 'textedit') {
|
if (self.svgCanvas.getMode() === 'textedit') {
|
||||||
$id('text').focus();
|
$id('text').focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user