Element.onKeyUp
and Element.onKeyDown
crash on synthetic browser events
#35656
Labels
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
library-html
web-libraries
Issues impacting dart:html, etc., libraries
dart --version
): 2.1.1-dev.0.1Element.onKeyUp
andElement.onKeyDown
throw a type error when the browser dispatches a synthetic event caused by a mouse click.To reproduce, compile and serve the following the following:
Typing inside the
<input>
works fine, however if you select one of the suggestions via a mouse click, the following exception is thrown.Stack trace from console:
Stack trace property from uncaught
TypeError
:The browser synthesizes a
keyup
event for the mouse click, however this event does not have typeKeyboardEvent
. The SDK attempts to dispatch this event on thekeyUp
stream anyway, which leads to the above type error due to the stream expecting events of typeKeyboardEvent
.The text was updated successfully, but these errors were encountered: