From 362de3b4ee27f20fa641b36716a92b2949b997ff Mon Sep 17 00:00:00 2001 From: "Julia.Radzhabova" Date: Tue, 10 Jun 2025 15:33:31 +0300 Subject: [PATCH] For bug 75106 --- apps/pdfeditor/main/app/controller/DocumentHolderExt.js | 2 +- apps/pdfeditor/main/app/controller/InsTab.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/pdfeditor/main/app/controller/DocumentHolderExt.js b/apps/pdfeditor/main/app/controller/DocumentHolderExt.js index 563015f8cb..5fc29b439e 100644 --- a/apps/pdfeditor/main/app/controller/DocumentHolderExt.js +++ b/apps/pdfeditor/main/app/controller/DocumentHolderExt.js @@ -2362,7 +2362,7 @@ define([], function () { }; dh.onNewPage = function(item) { - this.api && this.api.asc_AddPage(item.value); + this.api && this.api.asc_AddPage(item.value ? Math.min.apply(null, this.api.getSelectedPages()) : Math.max.apply(null, this.api.getSelectedPages())+1); Common.NotificationCenter.trigger('edit:complete', this.documentHolder); }; diff --git a/apps/pdfeditor/main/app/controller/InsTab.js b/apps/pdfeditor/main/app/controller/InsTab.js index 605de1152d..945ec92490 100644 --- a/apps/pdfeditor/main/app/controller/InsTab.js +++ b/apps/pdfeditor/main/app/controller/InsTab.js @@ -595,7 +595,7 @@ define([ }, onAddPage: function(before) { - this.api && this.api.asc_AddPage(!!before); + this.api && this.api.asc_AddPage(this.api.getCurrentPage() + (before ? 0 : 1) ); }, /* mouseenterSmartArt: function (groupName, menu) {