-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyBoardEvents cause error on serverside with IE Edge #4112
Comments
I think for missing |
Another alternative for this particular case would be to change the definition from |
After a discussion @mikotin we decided to add a way to handle the special cases of missing event data with an optional second parameter for the annotation that states the default value as a String. Thus when facing a missing parameter from client side, Flow will try to convert the value given in the string (if any) to the corresponding type in the event constructor. Eg. for this case, it would be |
Would support for default values then also be implemented for |
Oops for the first one, I don't see why not (adding overrides) for the second one. Also we should update the related tutorials https://github.com/vaadin/flow-and-components-documentation/search?l=AsciiDoc&q=EventData&type= |
What would happen if there are multiple |
Concluded that instead of allowing to explicitly configure default values, we should simplify this by explicitly checking for primitive If the developer wants to distinguish between e.g. |
Added primitive checking on event data value decoding, so that primitive values get default values instead of null. Fixes issue #4112
* Add primitive default data support on evendata Added primitive checking on event data value decoding, so that primitive values get default values instead of null. Fixes issue #4112 * Remove Pair usage Removed Pair -usage and moved primitive casting and checking prior to decode -call * Removed unused import * Added primitives support to JsonCodec.decodeAS - Added primitives support toJsonCodec.decodeAS - Added tests for primitives
KeyBoardEvent requires a "isComposing" property and Edge doesn't give such so using standard keyboard events (KeyDownEvent, KeyPressEvent, KeyUpEvent) will cause exception on creation of given event:
Test:
The data that actually comes from client to server:
In the end this is (isComposing) only a boolean value so probably it could just fall back to false in this (or other similar) cases.
The text was updated successfully, but these errors were encountered: