Commit e4d0c6b
authored
fix(ios): update pager view only when layout changed (#462)
Currently we update the pager view in `layoutSubviews` method to make sure that our layout stays in sync. However, this method seems to get called even if the layout didn't change - and calling `updateDataSource` dismisses the keyboard if it's visible, This causes the keyboard to be dismissed when it's not supposed to - e.g. auto focus on input doesn't work, keyboard doesn't stay open when app goes to background etc.
This adds a check to make sure that we call `updateDataSourcez only if the layout changes, which avoids unnecessary updates and avoids dismissing the keyboard unnecessarily.
Fixes #4411 parent c0e8d20 commit e4d0c6b
2 files changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| |||
0 commit comments