[DE PE SSE] Bug 54241

This commit is contained in:
JuliaSvinareva 2021-12-17 11:10:53 +03:00
parent 51942c7e02
commit 7dd6e0fd34
3 changed files with 30 additions and 1 deletions

View file

@ -72,6 +72,8 @@ define([
me.btnDarkDocument.on('click', _.bind(function () {
me.fireEvent('darkmode:change');
}, me));
me.cmbZoom.on('combo:focusin', _.bind(this.onComboOpen, this, false));
me.cmbZoom.on('show:after', _.bind(this.onComboOpen, this, true));
},
initialize: function (options) {
@ -239,6 +241,14 @@ define([
this.btnNavigation && this.btnNavigation.toggle(state, true);
},
onComboOpen: function (needfocus, combo) {
_.delay(function() {
var input = $('input', combo.cmpEl).select();
if (needfocus) input.focus();
else if (!combo.isMenuOpen()) input.one('mouseup', function (e) { e.preventDefault(); });
}, 10);
},
textNavigation: 'Navigation',
textZoom: 'Zoom',
textFitToPage: 'Fit To Page',

View file

@ -69,6 +69,8 @@ define([
me.chNotes && me.chNotes.on('change', _.bind(function (checkbox, state) {
me.fireEvent('notes:change', [me.chNotes, state === 'checked']);
}, me));
me.cmbZoom.on('combo:focusin', _.bind(this.onComboOpen, this, false));
me.cmbZoom.on('show:after', _.bind(this.onComboOpen, this, true));
},
initialize: function (options) {
@ -218,6 +220,14 @@ define([
}, this);
},
onComboOpen: function (needfocus, combo) {
_.delay(function() {
var input = $('input', combo.cmpEl).select();
if (needfocus) input.focus();
else if (!combo.isMenuOpen()) input.one('mouseup', function (e) { e.preventDefault(); });
}, 10);
},
textZoom: 'Zoom',
textFitToSlide: 'Fit To Slide',
textFitToWidth: 'Fit To Width',

View file

@ -90,7 +90,8 @@ define([
me.fireEvent('zoom:changedafter', [false, combo, record]);
}).on('combo:blur', function () {
me.fireEvent('editcomplete', me);
});
}).on('combo:focusin', _.bind(this.onComboOpen, this, false))
.on('show:after', _.bind(this.onComboOpen, this, true));
}
return {
@ -402,6 +403,14 @@ define([
}, this);
},
onComboOpen: function (needfocus, combo) {
_.delay(function() {
var input = $('input', combo.cmpEl).select();
if (needfocus) input.focus();
else if (!combo.isMenuOpen()) input.one('mouseup', function (e) { e.preventDefault(); });
}, 10);
},
capBtnSheetView: 'Sheet View',
capBtnFreeze: 'Freeze Panes',
textZoom: 'Zoom',