Close overlays and popups when pressing back

(Rikki Tooley) #1

On Windows Phone (and Android I think?), pressing the back button closes overlays and popups in native apps. To me, Discourse on mobile feels like an app (I have my site pinned to my start screen and everything), meaning I press the back button to close overlays by habit… I think it should behave like a native one in this respect. Currently, pressing the back button when e.g. the post editor is open will navigate to the last page.

I’m not sure whether this should apply to desktop as well, but I can’t think of a downside - even if the user expected that the last page would be shown (instead of closing the popup), all they need do is press back again.

If the post isn’t clear, I’ll find a link to the Windows Phone UX guidelines when I’m back at my desktop… that may help.

(Jordan Hofker) #2

I like the idea, but I’m not 100% hooking into the back button from a webpage is something that A) can be done and B) should be done.

Does clicking back in a desktop browser close the popups that you’re talking about?

(Rikki Tooley) #3

It’s possible, Discourse already uses the HTML5 history API. Though the number of users who would expect this behaviour is in the minority (Windows Phone + Android users)… and thinking about it, it would probably interfere with the “browse the forum while composing a post” feature.