I'm getting some new behavior I haven't seen before (on Venture 13.2.1) on UITableView.
Steps to reproduce:
- A table view row is selected and I swipe to delete the selected row.
- After about a half of a second the table view selects another row.
I'm not programmatically making a selection here after the swipe to delete. UIKit is doing it.
I set a breakpoint in -tableView:didSelectRowAtIndexPath: and it is related to the focus system:
#1 0x00000001b350b140 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:isCellMultiSelect:deselectPrevious:performCustomSelectionAction:] ()
#2 0x00000001b3512df8 in -[UITableView _didUpdateFocusInContext:withAnimationCoordinator:] ()
#3 0x0000000213b38988 in -[UITableViewAccessibility _didUpdateFocusInContext:withAnimationCoordinator:] ()
#4 0x00000001b2f54260 in __84-[UIFocusSystem _sendDidUpdateFocusNotificationsInContext:withAnimationCoordinator:]_block_invoke ()
#5 0x00000001b2f08944 in _UIFocusEnvironmentEnumerateAncestorEnvironments ()
#6 0x00000001b2f54480 in -[UIFocusSystem _sendNotificationsForFocusUpdateInContext:withAnimationCoordinator:usingBlock:] ()
#7 0x00000001b2f53ff0 in -[UIFocusSystem _sendDidUpdateFocusNotificationsInContext:withAnimationCoordinator:] ()
#8 0x00000001b2f53630 in -[UIFocusSystem _updateFocusWithContext:report:] ()
#9 0x00000001b2f5319c in -[UIFocusSystem updateFocusIfNeeded] ()
#10 0x00000001b2f561dc in __43-[UIFocusSystem _updateFocusUpdateThrottle]_block_invoke ()
#11 0x00000001b3725e70 in -[_UIAfterCACommitBlock run] ()
#12 0x00000001b37262cc in -[_UIAfterCACommitQueue flush] ()
#13 0x00000001b2851630 in _runAfterCACommitDeferredBlocks ()
#14 0x00000001b28513ac in _cleanUpAfterCAFlushAndRunDeferredBlocks ()
#15 0x00000001b28512c8 in _afterCACommitHandler ()
#16 0x00000001887b0db8 in CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION ()
#17 0x00000001887b0ca4 in __CFRunLoopDoObservers ()
This wasn't happening before. I'm not sure if it is related to the Ventura 13.2.1 update or if there is some minor tweak on my end that is causing this change in behavior though I'm not thrilling with UIKit making a selection without asking me about it.
I could live with the automatic row selection if the next row below the deleted row was automatically selected but sometimes it is not. Sometimes UITableView is auto selecting a row two cells back which doesn't make any sense to me.