mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where right-clicking a browser object does not apply to the object on which right-click was fired. Fixes #3523
Fixes keyboard navigation on the context menu applied to browser tree.
This commit is contained in:
committed by
Akshay Joshi
parent
4de6b93ba8
commit
077589e08b
@@ -24,6 +24,7 @@ Bug fixes
|
||||
*********
|
||||
|
||||
| `Issue #2813 <https://redmine.postgresql.org/issues/2813>`_ - Ensure that the password prompt should not be visible if the database server is in trust authentication mode.
|
||||
| `Issue #3523 <https://redmine.postgresql.org/issues/3523>`_ - Fixed an issue where right-clicking a browser object does not apply to the object on which right-click was fired.
|
||||
| `Issue #3645 <https://redmine.postgresql.org/issues/3645>`_ - Ensure that the start and end date should be deleted when clear the selection for pgAgent Job.
|
||||
| `Issue #3972 <https://redmine.postgresql.org/issues/3972>`_ - Modified keyboard shortcuts in Query Tool for OSX native support.
|
||||
| `Issue #3988 <https://redmine.postgresql.org/issues/3988>`_ - Fixed cursor disappeared issue in the query editor for some of the characters when zoomed out.
|
||||
|
||||
@@ -371,6 +371,27 @@ export class Tree {
|
||||
}
|
||||
}.bind(this));
|
||||
this.aciTreeApi = $treeJQuery.aciTree('api');
|
||||
|
||||
/* Ctrl + Click will trigger context menu. Select the node when Ctrl+Clicked.
|
||||
* When the context menu is visible, the tree should lose focus
|
||||
* to use context menu with keyboard. Otherwise, the tree functions
|
||||
* overrides the keyboard events.
|
||||
*/
|
||||
let contextHandler = (ev)=>{
|
||||
let treeItem = this.aciTreeApi.itemFrom(ev.target);
|
||||
if(treeItem.length) {
|
||||
if(ev.ctrlKey) {
|
||||
this.aciTreeApi.select(treeItem);
|
||||
}
|
||||
$(treeItem).on('contextmenu:visible', ()=>{
|
||||
$(treeItem).trigger('blur');
|
||||
$(treeItem).off('contextmenu:visible');
|
||||
});
|
||||
}
|
||||
};
|
||||
$treeJQuery
|
||||
.off('mousedown', contextHandler)
|
||||
.on('mousedown', contextHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user