Skip to content

Commit 6e0a0a1

Browse files
committed
Fixed Open Button
Signed-off-by: jbicker <jan.bicker@typefox.io>
1 parent c88d8dd commit 6e0a0a1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ export class ArduinoFrontendContribution implements TabBarToolbarContribution, C
232232
registry.registerCommand(ArduinoCommands.SHOW_OPEN_CONTEXT_MENU, {
233233
isVisible: widget => this.isArduinoToolbar(widget),
234234
isEnabled: widget => this.isArduinoToolbar(widget),
235-
execute: async (widget: Widget, event: React.MouseEvent<HTMLElement>) => {
236-
const el = (event.target as HTMLElement).parentElement;
235+
execute: async (widget: Widget, target: EventTarget) => {
236+
const el = (target as HTMLElement).parentElement;
237237
if (el) {
238238
this.contextMenuRenderer.render(ArduinoToolbarContextMenu.OPEN_SKETCH_PATH, {
239239
x: el.getBoundingClientRect().left,

arduino-ide-extension/src/browser/toolbar/arduino-toolbar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class ArduinoToolbar extends ReactWidget {
103103
protected executeCommand = (e: React.MouseEvent<HTMLElement>) => {
104104
const item = this.items.get(e.currentTarget.id);
105105
if (TabBarToolbarItem.is(item)) {
106-
this.commands.executeCommand(item.command, this, e);
106+
this.commands.executeCommand(item.command, this, e.target);
107107
}
108108
}
109109
}

0 commit comments

Comments
 (0)