From 7ba0da4615707c4ea3d3545de91d862f3b643088 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Thu, 5 Jun 2025 17:00:26 +0300 Subject: [PATCH] fix: placeholder uninsert when missed --- .../main/app/controller/SlideMasterTab.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/presentationeditor/main/app/controller/SlideMasterTab.js b/apps/presentationeditor/main/app/controller/SlideMasterTab.js index 151b26a234..4b64302899 100644 --- a/apps/presentationeditor/main/app/controller/SlideMasterTab.js +++ b/apps/presentationeditor/main/app/controller/SlideMasterTab.js @@ -68,7 +68,7 @@ define([ if (me.view.btnInsertPlaceholder.pressed && me.view.btnInsertPlaceholder.id !== btn_id) { me._isAddingShape = false; - + me._addAutoshape(false); me.view.btnInsertPlaceholder.toggle(false, true); Common.NotificationCenter.trigger('edit:complete', me.view); } @@ -117,6 +117,18 @@ define([ }); }, + _addAutoshape: function(isstart, type) { + if (this.api) { + if (isstart) { + this.api.StartAddShape(type, true); + $(document.body).on('mouseup', this.checkInsertAutoshape); + } else { + this.api.StartAddShape('', false); + $(document.body).off('mouseup', this.checkInsertAutoshape); + } + } + }, + onApiFocusObject: function(selectedObjects) { var in_slide_master = false; var i = -1, type, pr;