[DE] Fix button focus

This commit is contained in:
Julia Radzhabova 2021-04-15 01:24:55 +03:00
parent 4d7dc3bb65
commit 28c9471eae
2 changed files with 8 additions and 2 deletions

View file

@ -56,6 +56,12 @@ function onDropDownKeyDown(e) {
e.stopPropagation(); e.stopPropagation();
} }
} }
} else if ($this.hasClass('move-focus')) {
if (!(/^(27|13|9|32)/.test(e.keyCode) && !e.ctrlKey && !e.altKey)) {
patchDropDownKeyDown.call(this, e);
e.preventDefault();
e.stopPropagation();
}
} else { } else {
patchDropDownKeyDown.call(this, e); patchDropDownKeyDown.call(this, e);
e.preventDefault(); e.preventDefault();

View file

@ -92,7 +92,7 @@ define([
'<td class="padding-large">', '<td class="padding-large">',
'<button type="button" class="btn btn-text-default" id="bookmarks-btn-goto" style="margin-right: 5px;">', me.textGoto,'</button>', '<button type="button" class="btn btn-text-default" id="bookmarks-btn-goto" style="margin-right: 5px;">', me.textGoto,'</button>',
'<div style="display: inline-block; position: relative;">', '<div style="display: inline-block; position: relative;">',
'<button type="button" class="btn btn-text-default auto dropdown-toggle" id="bookmarks-btn-link" style="min-width: 75px;" data-toggle="dropdown">', me.textGetLink,'</button>', '<button type="button" class="btn btn-text-default auto dropdown-toggle move-focus" id="bookmarks-btn-link" style="min-width: 75px;" data-toggle="dropdown">', me.textGetLink,'</button>',
'<div id="id-clip-copy-box" class="dropdown-menu" style="width: 291px; left: -80px; padding: 10px;">', '<div id="id-clip-copy-box" class="dropdown-menu" style="width: 291px; left: -80px; padding: 10px;">',
'<div id="id-dlg-clip-copy"></div>', '<div id="id-dlg-clip-copy"></div>',
'<button id="id-dlg-copy-btn" class="btn btn-text-default" style="margin-left: 5px; width: 86px;">' + me.textCopy + '</button>', '<button id="id-dlg-copy-btn" class="btn btn-text-default" style="margin-left: 5px; width: 86px;">' + me.textCopy + '</button>',
@ -249,7 +249,7 @@ define([
}, },
getFocusedComponents: function() { getFocusedComponents: function() {
return [this.txtName, this.radioName, this.radioLocation, this.bookmarksList, this.chHidden]; return [this.txtName, this.radioName, this.radioLocation, this.bookmarksList, this.btnAdd, this.btnGoto, this.btnGetLink, this.btnDelete, this.chHidden];
}, },
afterRender: function() { afterRender: function() {