Hacker News new | ask | show | jobs
by slow_donkey 2843 days ago
This is interesting, in a native app the modal would close but unintuitively most sites don't push modals to history.
1 comments

In a native app, such modal would be pushed on the activity stack (on Android; I assume iOS has a similar pattern). It would essentially be a native equivalent of a new page. Modern web developers are, for some reason, more afraid of having multiple pages than they are of black death.
iOS does not push modals onto the navigation stack by default.
To be fair, iOS doesn't have a universal 'back' button, so you wouldn't reach for it to exit a modal anyway.
Sure, but the general guideline for modals is to have a "Cancel" or "Done" bar button item somewhere to exit. This is a different action than popping a view controller off the navigation stack.