Skip to content

Commit 0bbf613

Browse files
Update index.ts
1 parent 189c3b2 commit 0bbf613

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

XtermBlazor/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class XtermBlazor {
4444
} catch {
4545
// Asynchronous for both Blazor Server and Blazor WebAssembly apps.
4646
DotNet.invokeMethodAsync(this._ASSEMBLY_NAME, 'AttachCustomKeyEventHandler', id, this.parseKeyboardEvent(event));
47-
return this.getTerminalObjectById(id).customKeyEventHandler?.call(terminal, event) ?? true;
47+
return this.getTerminalObjectById(id).customKeyEventHandler(event);
4848
}
4949
});
5050
terminal.attachCustomWheelEventHandler(event => {
@@ -54,7 +54,7 @@ class XtermBlazor {
5454
} catch {
5555
// Asynchronous for both Blazor Server and Blazor WebAssembly apps.
5656
DotNet.invokeMethodAsync(this._ASSEMBLY_NAME, 'AttachCustomWheelEventHandler', id, event);
57-
return this.getTerminalObjectById(id).customWheelEventHandler?.call(terminal, event) ?? true;
57+
return this.getTerminalObjectById(id).customWheelEventHandler(event);
5858
}
5959
});
6060

@@ -73,8 +73,8 @@ class XtermBlazor {
7373
this._terminals.set(id, {
7474
terminal: terminal,
7575
addons: addons,
76-
customKeyEventHandler: undefined,
77-
customWheelEventHandler: undefined
76+
customKeyEventHandler: (event: KeyboardEvent) => true,
77+
customWheelEventHandler: (event: WheelEvent) => true,
7878
});
7979
}
8080

0 commit comments

Comments
 (0)