Skip to content

Commit

Permalink
Fix issue with delete key when editing
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmooney committed Jul 19, 2024
1 parent d71b4e8 commit 2b33ee5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/base/src/panelview/components/layers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export class LayersPanel extends Panel {
case 'mouseup':
this._mouseUpEvent(event as MouseEvent);
break;
default:
break;
}
}

Expand Down Expand Up @@ -125,8 +127,6 @@ export class LayersPanel extends Panel {
if (!node) {
return;
}
// (event.target as HTMLElement).tabIndex = 0;
// (event.target as HTMLElement).focus();

node.tabIndex = 0;
node.focus();
Expand Down
8 changes: 4 additions & 4 deletions python/jupytergis_lab/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
app.commands.addKeyBinding({
command: CommandIDs.removeLayer,
keys: ['Delete'],
selector: '.jp-gis-layerTitle'
selector: '.jp-gis-layerTitle .jp-gis-layerText'
});

app.contextMenu.addItem({
Expand All @@ -87,7 +87,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
app.commands.addKeyBinding({
command: CommandIDs.renameLayer,
keys: ['F2'],
selector: '.jp-gis-layerTitle'
selector: '.jp-gis-layerTitle .jp-gis-layerText'
});

const submenu = new Menu({ commands: app.commands });
Expand Down Expand Up @@ -122,7 +122,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
app.commands.addKeyBinding({
command: CommandIDs.removeGroup,
keys: ['Delete'],
selector: '.jp-gis-layerGroupHeader'
selector: '.jp-gis-layerGroupHeader .jp-gis-layerText'
});

app.contextMenu.addItem({
Expand All @@ -134,7 +134,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
app.commands.addKeyBinding({
command: CommandIDs.renameGroup,
keys: ['F2'],
selector: '.jp-gis-layerGroupHeader'
selector: '.jp-gis-layerGroupHeader .jp-gis-layerText'
});

if (mainMenu) {
Expand Down

0 comments on commit 2b33ee5

Please sign in to comment.