From bd3629838e0d205b9c34acddfb2018391a749948 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 18 Jun 2021 15:24:44 +0300 Subject: [PATCH] [DE] Fix Bug 50920 --- apps/documenteditor/main/app/controller/Toolbar.js | 6 +++++- apps/documenteditor/main/app/view/Toolbar.js | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 8a36cc75b..a48fe02ad 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -1227,8 +1227,12 @@ define([ onHorizontalAlign: function(type, btn, e) { this._state.pralign = undefined; - if (this.api) + if (this.api) { + if (!btn.pressed) { + type = (type==1) ? 3 : 1; + } this.api.put_PrAlign(type); + } Common.NotificationCenter.trigger('edit:complete', this.toolbar); Common.component.Analytics.trackEvent('ToolBar', 'Align'); diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 3b3ebca59..534b5fad1 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -311,7 +311,6 @@ define([ cls: 'btn-toolbar', iconCls: 'toolbar__icon btn-align-left', enableToggle: true, - allowDepress: false, toggleGroup: 'alignGroup' }); this.paragraphControls.push(this.btnAlignLeft); @@ -321,7 +320,6 @@ define([ cls: 'btn-toolbar', iconCls: 'toolbar__icon btn-align-center', enableToggle: true, - allowDepress: false, toggleGroup: 'alignGroup' }); this.paragraphControls.push(this.btnAlignCenter); @@ -331,7 +329,6 @@ define([ cls: 'btn-toolbar', iconCls: 'toolbar__icon btn-align-right', enableToggle: true, - allowDepress: false, toggleGroup: 'alignGroup' }); this.paragraphControls.push(this.btnAlignRight); @@ -341,12 +338,10 @@ define([ cls: 'btn-toolbar', iconCls: 'toolbar__icon btn-align-just', enableToggle: true, - allowDepress: false, toggleGroup: 'alignGroup' }); this.paragraphControls.push(this.btnAlignJust); - this.btnDecLeftOffset = new Common.UI.Button({ id: 'id-toolbar-btn-decoffset', cls: 'btn-toolbar',