Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relax the event assumptions for keydown events. (flutter#53830)
This PR addresses an issue where autocompleting a text field, even without direct keyboard input, unexpectedly triggers keydown events. To resolve this, the code now relaxes the casting assumptions to accommodate a wider range of event types, not just keyboard events. By just adding the following script to the console, and filling the text field using autocomplete, you can see that indeed the fired event is not of type `KeyboardEvent` but `Event`. ```javascript document.body.addEventListener('keydown', console.log) ``` Fixes flutter/flutter#149968 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
- Loading branch information