Co-authored-by: Pavel Djundik <github@xpaw.me>
Mobile viewports whose width is equal to the upper boundary
of the mobile viewport breakpoint would not automatically
close the sidebar when selecting an item in it.
Closes#2783.
This commit packs 2 fixes:
- Reloading the page while viewing the settings or help window would now send you to a channel window. This was broken when fixing an issue with the "Join a channel..." form
- Reloading the page while viewing the changelog would also send you to a channel window. This is because, on reload, the click emitted was restricted to sidebar and footer, while it had to be emitted from the help page. It is yet another aspect of our wonky window management and hopefully we can make this much more robust with a better overall solution.
Without this, `target` was matching all of the lobby link, the "Join a channel..." button, and the join form submit button. This change restricts to the first one.