URL, main frame, and chat frame mismatch when using browser history back button
Reproduction steps
- Have the https://gitter.im/gitterHQ/sandbox chat open and https://gitter.im/gitlabhq/gitlabhq in the sidebar of Gitter
- Open a new tab and go to https://gitter.im/gitterHQ/sandbox
- In the sidebar of Gitter, click gitlabhq/gitlabhq
- In the same tab, go to another page, e.g. https://www.bbc.co.uk/
- Click 'Back'
Expected
-
gitlabhq
room content, thegitlabhq
URL andgitlabhq
in the HTML title of the page
Actual result
-
gitlabhq
in the URL✔ -
sandbox
in the HTML title❌ – wrong room -
sandbox
content❌ – wrong room
Affected browsers include:
- Chromium
- Firefox
- Iridium
- Otter Browser
- SeaMonkey
- Web
Example
Firefox 56.0.2 (64-bit) with a new, clean profile:
Gitter is Current (not Next).
Here is a YouTube video of this bug in action, https://www.youtube.com/watch?v=tMEvOwiI9pU
Related
Chat Frame not matching Room URL (#1410) · Issues · GitLab.org / gitter / webapp · GitLab (closed, date of closure unknown)
Comment 17 (2017-11-07) under Mozilla bug 1245331 - Investigate how changing history state in iframe affects tab history
It seems when switching between chatrooms on gitter, the iframe's
document.URL
keeps the same. …
… what Firefox tries to restore to the iframe on history navigation, so it ends up showing a wrong place. From what I found currently Firefox behaves as expected. …
Comparable
Changing rooms quickly on page-load results in wrong chat frame (#1191) · Issues · GitLab.org / gitter / webapp · GitLab (2016-03-25) in particular:
… bitten by this. This can be particularly nasty when one thinks they are typing into a private room, but the message is delivered to the public room of the inner frame.
Restored tab state is incorrect (#1254) · Issues · GitLab.org / gitter / webapp · GitLab (2016-05-13)