Skip to content

Commit cd3f28a

Browse files
Merge pull request #48 from aaasoft/Fix-Bug-AttachCustomWheelEventHanler-NotFound
Fix AttachCustomWheelEventHandler error in frontend.
2 parents c3598a2 + 36ec003 commit cd3f28a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

XtermBlazor/XtermHandler.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,18 @@ public static bool AttachCustomKeyEventHandler(string id, KeyboardEventArgs @eve
188188
return GetTerminal(id)?.CustomKeyEventHandler.Invoke(@event) ?? true;
189189
}
190190

191+
/// <summary>
192+
/// An event handler before wheel are processed
193+
/// </summary>
194+
/// <param name="id"></param>
195+
/// <param name="event"></param>
196+
/// <returns></returns>
197+
[JSInvokable]
198+
public static bool AttachCustomWheelEventHandler(string id, WheelEventArgs @event)
199+
{
200+
return GetTerminal(id)?.CustomWheelEventHandler.Invoke(@event) ?? true;
201+
}
202+
191203
private static Xterm? GetTerminal(string id)
192204
{
193205
return _terminals.ContainsKey(id) ? _terminals[id] : null;

0 commit comments

Comments
 (0)