[SSE] Bug 46133

This commit is contained in:
JuliaSvinareva 2020-08-25 14:06:46 +03:00
parent 2024d1fdb5
commit 25524e53f5

View file

@ -222,6 +222,12 @@ define([
this.bar.trigger('tab:manual', this.bar, this.bar.tabs.indexOf(tab), tab); this.bar.trigger('tab:manual', this.bar, this.bar.tabs.indexOf(tab), tab);
} else { } else {
tab.changeState(); tab.changeState();
if (this.bar.isEditFormula)
setTimeout(function(){
$('#ce-cell-content').focus();
var $cellContent = $('#ce-cell-content')[0];
$cellContent.selectionStart = $cellContent.selectionEnd = $cellContent.value.length;
}, 500);
} }
} }
} }
@ -250,7 +256,14 @@ define([
} else { } else {
this.bar.$el.find('ul > li > span').attr('draggable', 'false'); this.bar.$el.find('ul > li > span').attr('draggable', 'false');
} }
this.bar.trigger('tab:drag', this.bar.selectTabs); if ($('#ce-cell-content').is(':focus'))
if (!this.bar.isEditFormula) {
$('#ce-cell-content').blur();
} else {
setTimeout(function () {
$('#ce-cell-content').focus();
}, 500)
}
}, this) }, this)
}); });
tab.$el.children().on( tab.$el.children().on(