Skip to content

Fix main navigation bar gestures like scroll to top not working on iOS 26#1537

Open
patrys wants to merge 1 commit intomastodon:developfrom
patrys:fix-navbar-double-tap-in-ios26
Open

Fix main navigation bar gestures like scroll to top not working on iOS 26#1537
patrys wants to merge 1 commit intomastodon:developfrom
patrys:fix-navbar-double-tap-in-ios26

Conversation

@patrys
Copy link
Copy Markdown

@patrys patrys commented Mar 10, 2026

Liquid glass takes over the tap gestures and the previously used double tap gesture is never triggered. This change replaces it with handling of tab re-selection inside the tabBarController(_:didSelect:) delegate.

Fixes #1530

Liquid glass takes over the tap gestures and the previously used double
tap gesture is never triggered. This change replaces it with handling of
tab re-selection inside the `tabBarController(_:didSelect:)` delegate.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 10, 2026

CLA assistant check
All committers have signed the CLA.

@patrys patrys changed the title Fix main nav bar gestures not working on iOS 26 Fix main navigation bar gestures like scroll to top not working on iOS 26 Mar 10, 2026
@patrys
Copy link
Copy Markdown
Author

patrys commented Mar 10, 2026

One regression that is not easy to work around is that in didSelect it's hard to tell if any views were popped from the view stack. Which means if you scroll down, load a post, and then tap Home, you will not only navigate back out of the post but also scroll to the top, which is annoying (but still better than not having a way to scroll to the top).

@patrys
Copy link
Copy Markdown
Author

patrys commented Mar 11, 2026

Actually, scratch the above, the original implementation suffered from the same compromise.

@whattherestimefor
Copy link
Copy Markdown
Contributor

Since the previous solution was implemented with a double tap gesture, how about adding a timing check to this one so that the reselection has to be close in time (probably < 0.5 sec) to the previous one, to avoid too many accidental triggers?

@patrys
Copy link
Copy Markdown
Author

patrys commented Mar 25, 2026

@whattherestimefor Did you have a chance to test this on device? I'm not sure it's worth adding a delay since it seems to do some sort of internal debouncing, at least on iOS 26.

We can also later replace the UITabBar with a SwiftUI TabView, which handles this automatically when the tab contains a scroll view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Scroll up with Home Button

3 participants