Commit 1d5979f
authored
Adopt PlatformTextInputService2 (#2990)
Extend the functionality of the `TextEditingScope` and adjust its
behaviour to align with the `EditProcessor`'s commands.
Apply `recomposeAndLayout` after edit commands to recalculate the text
and layout state.
Refactor the `UIKitTextInputService` to use the
`PlatformTextInputMethodRequest` directly to bypass issues caused by
delays in mutable state propagation.
Add the `UIKitTextInputServiceAdapter` to support the deprecated
`PlatformTextInputService`.
Fixes
https://youtrack.jetbrains.com/issue/CMP-7832/iOS-Adopt-PlatformTextInputService2
Fixes
https://youtrack.jetbrains.com/issue/CMP-7983/BasicTextFieldTextFieldState-inputTransformation-reports-inconsistent-changes-between-Android-and-iOS
Fixes
https://youtrack.jetbrains.com/issue/CMP-9566/BasicTextField-w-InputTransformation-incorrect-internal-state-on-iOS
## Release Notes
### Fixes - iOS
- Fix issue where `BasicTextField` reported inconsistent changes between
Android and iOS
- Fix issue where a `BasicTextField` with `InputTransformation` may use
the incorrect internal text state.1 parent eabcbcd commit 1d5979f
15 files changed
Lines changed: 1112 additions & 437 deletions
File tree
- compose
- foundation/foundation/src
- skikoMain/kotlin/androidx/compose/foundation/text/input/internal
- skikoTest/kotlin/androidx/compose/foundation/text
- ui
- ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/input
- ui-uikit/src/iosMain/objc/CMPUIKitUtils/CMPUIKitUtils
- ui/src
- iosMain/kotlin/androidx/compose/ui
- platform
- scene
- text/input
- window
- uikitInstrumentedTest/kotlin/androidx/compose/ui/leaks
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
| |||
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
155 | 164 | | |
156 | 165 | | |
157 | 166 | | |
| |||
161 | 170 | | |
162 | 171 | | |
163 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
164 | 179 | | |
165 | 180 | | |
166 | 181 | | |
| |||
Lines changed: 13 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
| 146 | + | |
148 | 147 | | |
149 | 148 | | |
150 | 149 | | |
151 | 150 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 151 | | |
159 | 152 | | |
160 | 153 | | |
| |||
180 | 173 | | |
181 | 174 | | |
182 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
183 | 180 | | |
184 | 181 | | |
185 | 182 | | |
186 | 183 | | |
187 | 184 | | |
188 | 185 | | |
189 | | - | |
190 | | - | |
191 | | - | |
| 186 | + | |
192 | 187 | | |
193 | 188 | | |
194 | 189 | | |
| |||
200 | 195 | | |
201 | 196 | | |
202 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
203 | 202 | | |
204 | 203 | | |
205 | 204 | | |
206 | 205 | | |
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
210 | | - | |
| 209 | + | |
211 | 210 | | |
212 | 211 | | |
213 | | - | |
214 | | - | |
215 | | - | |
| 212 | + | |
216 | 213 | | |
217 | 214 | | |
218 | 215 | | |
| |||
222 | 219 | | |
223 | 220 | | |
224 | 221 | | |
225 | | - | |
| 222 | + | |
226 | 223 | | |
227 | 224 | | |
228 | 225 | | |
| |||
0 commit comments