Open MushKPN opened 3 days ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
I can repro this issue at Android platform on the latest 17.11.0 Preview 2.1 (8.0.61&8.0.40).
Description
I've found an issue while inputting data into an Entry with the help of a barcode reader and using observable properties.
In my project, I'm using a barcode event provided by the device's manufacturer library (Honeywell SDK). I've managed to reproduced it in a simpler way without using this SDK.
Steps to Reproduce
Using my repro project, start the app and focus the first Entry, scan a barcode (you will find a PDF with barcodes in the root folder - Interleaved 2 of 5 format)
When the value is read and assigned to the observable property (InputTwo), the app crashes because the destination Entry has a max length of 4 and the input has a length of 6.
I guess that without using a barcode reader, you could reproduyce this issue : create a button with a command that assign a 6 digit string to an observable property which is binded to an Entry with MaxLength = 4
Link to public reproduction project repository
https://github.com/MushKPN/MAUI_InputCrash
Version with bug
8.0.61 SR6.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 10 API 29
Did you find any workaround?
In my project, I'm intercepting the barcode event and reducing the input prior to assign the observable property In the repro project, you can use the OnValueChanging event of MVVM Community Toolkit
Relevant log output