diff --git a/packages/keymaps/src/browser/keybindings-widget.tsx b/packages/keymaps/src/browser/keybindings-widget.tsx index 572d17dabd40b..27b60fefb8315 100644 --- a/packages/keymaps/src/browser/keybindings-widget.tsx +++ b/packages/keymaps/src/browser/keybindings-widget.tsx @@ -382,7 +382,10 @@ export class KeybindingWidget extends ReactWidget { * @param item the keybinding item for the row. */ protected renderEdit(item: KeybindingItem): React.ReactNode { - return this.editKeybinding(item)}>; + return { + e.preventDefault(); + this.editKeybinding(item); + }}>; } /** @@ -392,7 +395,10 @@ export class KeybindingWidget extends ReactWidget { */ protected renderReset(item: KeybindingItem): React.ReactNode { return (item.keybinding && item.keybinding.scope === KeybindingScope.USER) - ? this.resetKeybinding(item)}> : ''; + ? { + e.preventDefault(); + this.resetKeybinding(item); + }}> : ''; } /**