Added tab navigation on close buttons for all the panels and create/properties dialog.

Added tab navigation for scroll left and scroll right buttons on the main window.

Fixes #4601
This commit is contained in:
Nagesh Dhope
2020-02-04 11:30:33 +05:30
committed by Akshay Joshi
parent b0a0a7c50a
commit b6173c9d7b
6 changed files with 23 additions and 15 deletions

View File

@@ -1532,9 +1532,9 @@ define('pgadmin.browser.node', [
}], 'footer', 'pg-prop-btn-group-below');
btn_grp.on('keydown', 'button', function(event) {
if (event.keyCode == 9 && $(this).nextAll('button:not([disabled])').length == 0) {
// set focus back to first editable input element of current active tab once we cycle through all enabled buttons.
commonUtils.findAndSetFocus(view.$el.find('.tab-content div.active'));
if (!event.shiftKey && event.keyCode == 9 && $(this).nextAll('button:not([disabled])').length == 0) {
// set focus back to first focusable element on dialog
view.$el.closest('.wcFloating').find('[tabindex]:not([tabindex="-1"]').first().focus();
return false;
}
});
@@ -1553,6 +1553,15 @@ define('pgadmin.browser.node', [
// Show contents before buttons
j.prepend(content);
view.$el.closest('.wcFloating').find('.wcFrameButtonBar > .wcFrameButton[style!="display: none;"]').on('keydown', function(e) {
if(e.shiftKey && e.keyCode === 9) {
e.stopPropagation();
setTimeout(() => {
view.$el.closest('.wcFloating').find('[tabindex]:not([tabindex="-1"]):not([disabled])').last().focus();
}, 10);
}
});
}.bind(panel),
closePanel = function(confirm_close_flag) {
if(!_.isUndefined(confirm_close_flag)) {

View File

@@ -17,9 +17,9 @@ let _browserPanel = null;
// Default Tool Bar Buttons.
let _defaultToolBarButtons = [
{
label: gettext('Filtered Rows'),
ariaLabel: gettext('Filtered Rows'),
btnClass: 'pg-font-icon icon-filter-table-toolbar',
label: gettext('Query Tool'),
ariaLabel: gettext('Query Tool'),
btnClass: 'pg-font-icon icon-query-tool',
text: '',
toggled: false,
toggleClass: '',
@@ -37,9 +37,9 @@ let _defaultToolBarButtons = [
enabled: false,
},
{
label: gettext('Query Tool'),
ariaLabel: gettext('Query Tool'),
btnClass: 'pg-font-icon icon-query-tool',
label: gettext('Filtered Rows'),
ariaLabel: gettext('Filtered Rows'),
btnClass: 'pg-font-icon icon-filter-table-toolbar',
text: '',
toggled: false,
toggleClass: '',