Skip to content

Commit 2b33ee5

Browse files
committed
Fix issue with delete key when editing
1 parent d71b4e8 commit 2b33ee5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/base/src/panelview/components/layers.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ export class LayersPanel extends Panel {
9090
case 'mouseup':
9191
this._mouseUpEvent(event as MouseEvent);
9292
break;
93+
default:
94+
break;
9395
}
9496
}
9597

@@ -125,8 +127,6 @@ export class LayersPanel extends Panel {
125127
if (!node) {
126128
return;
127129
}
128-
// (event.target as HTMLElement).tabIndex = 0;
129-
// (event.target as HTMLElement).focus();
130130

131131
node.tabIndex = 0;
132132
node.focus();

python/jupytergis_lab/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
7575
app.commands.addKeyBinding({
7676
command: CommandIDs.removeLayer,
7777
keys: ['Delete'],
78-
selector: '.jp-gis-layerTitle'
78+
selector: '.jp-gis-layerTitle .jp-gis-layerText'
7979
});
8080

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

9393
const submenu = new Menu({ commands: app.commands });
@@ -122,7 +122,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
122122
app.commands.addKeyBinding({
123123
command: CommandIDs.removeGroup,
124124
keys: ['Delete'],
125-
selector: '.jp-gis-layerGroupHeader'
125+
selector: '.jp-gis-layerGroupHeader .jp-gis-layerText'
126126
});
127127

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

140140
if (mainMenu) {

0 commit comments

Comments
 (0)