[DE] Bug 57756

This commit is contained in:
JuliaSvinareva 2022-06-29 15:49:30 +03:00
parent 6e279d6b34
commit 0d333bffc8
3 changed files with 22 additions and 4 deletions

View file

@ -118,7 +118,8 @@ Common.UI.HintManager = new(function() {
_isDocReady = false,
_isEditDiagram = false,
_usedTitles = [],
_appPrefix;
_appPrefix,
_isScroll = false;
var _api;
@ -461,7 +462,14 @@ Common.UI.HintManager = new(function() {
_clearHints();
});
$(document).on('keyup', function(e) {
if (e.keyCode == Common.UI.Keys.ALT && _needShow && !(window.SSE && window.SSE.getController('Statusbar').getIsDragDrop())) {
if (_isScroll && (e.keyCode === Common.UI.Keys.UP || e.keyCode === Common.UI.Keys.DOWN)) {
_isScroll = false;
_hideHints();
_currentHints.length = 0;
_currentControls.length = 0;
_showHints();
console.log($(':focus'));
} else if (e.keyCode == Common.UI.Keys.ALT && _needShow && !(window.SSE && window.SSE.getController('Statusbar').getIsDragDrop())) {
e.preventDefault();
if (!_hintVisible) {
$('input:focus').blur(); // to change value in inputField
@ -484,7 +492,9 @@ Common.UI.HintManager = new(function() {
$(document).on('keydown', function(e) {
if (_hintVisible) {
e.preventDefault();
if (e.keyCode == Common.UI.Keys.ESC ) {
if (e.keyCode === Common.UI.Keys.UP || e.keyCode === Common.UI.Keys.DOWN) {
_isScroll = true;
} else if (e.keyCode == Common.UI.Keys.ESC ) {
setTimeout(function () {
if (_currentLevel === 0) {
_hideHints();

View file

@ -680,6 +680,8 @@ define([
menuFilesShowHide: function(state) {
if (this.api && state == 'hide')
this.api.asc_enableKeyEvents(true);
else
this.api.asc_enableKeyEvents(false);
},
onMenuChange: function (value) {

View file

@ -247,7 +247,7 @@ define([
template: _.template([
'<div class="flex-settings">',
'<table style="margin: 10px 14px 0;"><tbody>',
'<table class="oo" style="margin: 10px 14px 0;"><tbody>',
'<tr class="editsave">',
'<td colspan="2" class="group-name top"><label><%= scope.txtEditingSaving %></label></td>',
'</tr>',
@ -738,6 +738,12 @@ define([
this.updateSettings();
this.updateScroller();
var me = this;
setTimeout(function () {
$(me.el).find('.ps-container table')[0].focus();
console.log($(':focus'));
}, 300);
},
updateScroller: function() {