[DE] Bug 57756

This commit is contained in:
JuliaSvinareva 2022-07-04 11:45:40 +03:00
parent 0d333bffc8
commit 094cb9989b
3 changed files with 17 additions and 14 deletions

View file

@ -464,11 +464,8 @@ Common.UI.HintManager = new(function() {
$(document).on('keyup', function(e) {
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'));
Common.NotificationCenter.trigger('hints:hover', false);
} else if (e.keyCode == Common.UI.Keys.ALT && _needShow && !(window.SSE && window.SSE.getController('Statusbar').getIsDragDrop())) {
e.preventDefault();
if (!_hintVisible) {
@ -492,8 +489,12 @@ Common.UI.HintManager = new(function() {
$(document).on('keydown', function(e) {
if (_hintVisible) {
e.preventDefault();
if (e.keyCode === Common.UI.Keys.UP || e.keyCode === Common.UI.Keys.DOWN) {
if ($('#file-menu-panel').is(':visible') && _currentLevel === 2 && (e.keyCode === Common.UI.Keys.UP || e.keyCode === Common.UI.Keys.DOWN)) {
_hideHints();
_currentHints.length = 0;
_currentControls.length = 0;
_isScroll = true;
Common.NotificationCenter.trigger('hints:hover', true);
} else if (e.keyCode == Common.UI.Keys.ESC ) {
setTimeout(function () {
if (_currentLevel === 0) {

View file

@ -386,17 +386,21 @@
};
var bindKeyboardHandler = function () {
var hovered = false;
var hovered = false,
altHovered = false;
$this.bind('mouseenter' + eventClassName, function (e) {
hovered = true;
});
$this.bind('mouseleave' + eventClassName, function (e) {
hovered = false;
});
Common.NotificationCenter.on('hints:hover', function (isHover) {
altHovered = isHover;
});
var shouldPrevent = false;
$(document).bind('keydown' + eventClassName, function (e) {
if (!hovered || $(document.activeElement).is(":input,[contenteditable]")) {
if ((!hovered && !altHovered) || $(document.activeElement).is(":input,[contenteditable]")) {
return;
}

View file

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