Commit b262423
committed
[Tab] Fix NPE caused by set a position less than 0
If somehow scroll position is set to -1 with and position offset greater than 0.5, we will decide it's a valid scroll position which causes NPE for selected child not found.
Fixes this by checking if position is valid regardless the offset and falling back to 0 if a negative position is given.
Resolves #2464
PiperOrigin-RevId: 408894188
(cherry picked from commit 823c34a)1 parent 3651890 commit b262423
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
692 | | - | |
| 692 | + | |
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
| |||
1881 | 1881 | | |
1882 | 1882 | | |
1883 | 1883 | | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
1884 | 1887 | | |
1885 | 1888 | | |
1886 | 1889 | | |
1887 | 1890 | | |
1888 | | - | |
| 1891 | + | |
1889 | 1892 | | |
1890 | 1893 | | |
1891 | 1894 | | |
| |||
0 commit comments