You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
triggerKeyEvent now allows to pass a string as third argument, representing the e.key of the dispatched event.
By the KeyboardEvent#key spec, the strings have to be capitalized (Enter instead of enter, Tab instead of tab, ...). But it's easy for users to forget and pass enter, which is invalid but they don't receive any warning or error.
We must help users by detect this mistake.
The text was updated successfully, but these errors were encountered:
Related to this, some of our tests were broken, where we had e.g. triggerKeyEvent('keyup', '13') - which used to work, but then stopped working. Removing the quotes made it work, but it was still pretty confusing, and took some time to figure out what was going on. I think for the sake of backwards-compatibility, it would be nice if it would detect "strings that are actually numbers" and just convert them to a number for you.
triggerKeyEvent
now allows to pass a string as third argument, representing thee.key
of the dispatched event.By the
KeyboardEvent#key
spec, the strings have to be capitalized (Enter
instead ofenter
,Tab
instead oftab
, ...). But it's easy for users to forget and passenter
, which is invalid but they don't receive any warning or error.We must help users by detect this mistake.
The text was updated successfully, but these errors were encountered: