Fix Tags table scroll staying disabled after backgrounding#973
Open
mvanhorn wants to merge 1 commit into
Open
Conversation
The POI Common Tags and All Tags tables could become permanently unscrollable. When the autocomplete completion overlay appears on iOS 26+, AutocompleteTextField disables the enclosing table view's scrolling so the overlay owns it, restoring it only when the overlay is torn down. If the app resigned active (e.g. switching to Safari) while the overlay was showing, the teardown path never ran and the Tags table was left with isScrollEnabled = false. Dismiss the completion overlay on UIApplication.willResignActive so scrolling is restored before backgrounding, and defensively re-enable the enclosing table view's scrolling when editing ends. Fixes bryceco#867
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes the POI tag tables (Common Tags and All Tags) becoming permanently unscrollable, as reported when switching to another app mid-edit and coming back.
Why
When the autocomplete completion overlay appears on iOS 26+,
AutocompleteTextFieldsets the enclosing table view'sisScrollEnabled = falseso the overlay owns scrolling. That flag is only restored totruein the overlay teardown branch ofupdateCompletionTableView().If the app resigns active (for example switching to Safari) while the overlay is showing, the field can lose its editing state without the teardown path ever running, so the Tags table is left stuck at
isScrollEnabled = falseand never scrolls again. That matches the reported repro of switching to Safari and back.Change
UIApplication.willResignActiveNotification(registered alongside the existing keyboard observers, removed by the existingdeinit), so scrolling is restored before the app backgrounds. The handler is guarded onfilteredCompletionsbeing non-empty, so fields without an active overlay do nothing and inactive tables are not disturbed when the app switcher or control center is opened.textFieldDidEndEditingas a belt-and-suspenders restore.The fix is confined to
AutocompleteTextField.swift, the only place that disables the parent table's scrolling.Fixes #867