bug 25490

bug 25490
This commit is contained in:
OVSharova 2022-12-13 15:46:59 +03:00
parent 3ddbc065e9
commit 138c5661ee
2 changed files with 7 additions and 4 deletions

View file

@ -671,8 +671,11 @@ define([
onEditComplete: function(cmp, opts) {
if (opts && opts.restorefocus && this.api.isCEditorFocused) {
this.formulaInput.blur();
this.formulaInput.focus();
var me = this;
setTimeout(function () {
me.formulaInput.blur();
me.formulaInput.focus();
}, 0);
} else {
this.getApplication().getController('DocumentHolder').getView('DocumentHolder').focus();
this.api.isCEditorFocused = false;

View file

@ -670,7 +670,7 @@ define([
btnSubscript.options.icls = item.options.icls;
}
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.NotificationCenter.trigger('edit:complete', this.toolbar, {restorefocus:true});
Common.component.Analytics.trackEvent('ToolBar', (item.value == 'sub') ? 'Subscript' : 'Superscript');
},
@ -685,7 +685,7 @@ define([
this.api.asc_setCellSuperscript(btn.pressed);
}
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.NotificationCenter.trigger('edit:complete', this.toolbar, {restorefocus:true});
Common.component.Analytics.trackEvent('ToolBar', (subscript) ? 'Subscript' : 'Superscript');
},