I was trying to recreate an existing user interface view in SwiftUI but got stumped for a while by some erratic behavior. I’ve built a nice sample app which is also on GitHub. This has been filed as FB9715757.
Description
If you have a List with movable rows that has a Textfield in its rows there is an issue if you try to move a row while it is first responder.
Steps to Reproduce
Please run the provided sample app on iOS 15 simulator.
- Tap on the item titled ‘One’ below and modify the string.
- Use the item’s reorder handle to move it into second position.
- Drag it back up into first position.
Expected Behavior
That you can move the row back into first position.
Actual Behavior
The system won’t let you drop the row in first position. Sometimes the row disappears entirely leaving a gap between the “Two” and “Three” items (see screenshot)
A functioning workaround is if the first responder is resigned before the move itself.
Also published on Medium.
Categories: Bug Reports