[SpatNav] Fix crash of multiple select element on spatial navigation mode
If no option has been selected and no option has been get focused by spatial navigation, "active_selection_end_" has "null" value. So, direct access to "active_selection_end_" seems unsafe. The bug only reproduces if no prior selection has been made (=> active_selection_end_ has not been set). In order to prevent this crash, I added validating of "active_selection_end_" and used "NextSelectableOption()" The existing "snav-multiple-select.html" conduct test for option selection after focus moving test, so it does not cause crash. So I added a TC for ensure the operation for selecting options. Bug: 1006116 Change-Id: Iec277b52272ec1491749b14ec4720f3ff0e578c5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1820924 Commit-Queue: Jeonghee Ahn <jeonghee27.ahn@lge.com> Reviewed-by:Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#700196}
Showing
Please register or sign in to comment