diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index a244f95a..c0c8b1a7 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -5373,11 +5373,6 @@ var getMouseTarget = this.getMouseTarget = function(evt) { return; } - // Reset context - if(current_group) { - leaveContext(); - } - if(parent.tagName !== 'g' || parent === current_layer || mouse_target === selectorManager.selectorParentGroup) { // Escape from in-group edit return; @@ -9045,6 +9040,7 @@ var leaveContext = this.leaveContext = function() { // Function: setContext // Set the current context (for in-group editing) var setContext = this.setContext = function(elem) { + leaveContext(); if(typeof elem === 'string') { elem = getElem(elem); }