Commit b7c6936
authored
[Android] Exception thrown when give more than 5000 characters to the Text property of Entry. (#30242)
### Issue Details:
Exception thrown when give more than 5000 characters to the Text
property of Entry on Android platform.
### Root Cause:
When the Entry contains more than 5000 characters and the IsPassword
property is mapped before the MaxLength property, the EditText input
type is set to InputTypes.ClassText | InputTypes.TextVariationNormal.
After the input type is updated, we attempts to restore the previous
cursor position, which exceeds 5000 characters. This results in an
IndexOutOfBoundsException during the selection process.
### Description of Change:
To prevent the crash, I reordered the property mappers by applying the
MaxLength mapper before the IsPassword mapper in EntryHandler
**Tested the behavior in the following platforms.**
- [x] Android
- [x] Windows
- [x] iOS
- [x] Mac
### Reference:
N/A
### Issues Fixed:
Fixes #30144
### Screenshots
| Before | After |
|---------|--------|
| The application is crashed | <Image
src="https://github.com/user-attachments/assets/f690b53b-a2f2-4adb-89b4-e190b94179b9">
|1 parent 17b7df9 commit b7c6936
File tree
2 files changed
+65
-2
lines changed- src
- Controls/tests/DeviceTests/Elements/Entry
- Core/src/Handlers/Entry
2 files changed
+65
-2
lines changedLines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
241 | 300 | | |
242 | 301 | | |
243 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
33 | | - | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| |||
0 commit comments