5

Bug: “Testfield in Row of List with Movable Items”

 2 years ago
source link: https://www.cocoanetics.com/2021/10/bug-testfield-in-row-of-list-with-movable-items/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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.

  1. Tap on the item titled ‘One’ below and modify the string.
  2. Use the item’s reorder handle to move it into second position.
  3. 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.

Like this:


Categories: Bug Reports


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK