Last modified: 2014-03-07 13:20:54 UTC
VisualEditor uses pushState to add veaction=edit to the URL when you click the VE edit tab, without causing a true reload. However, this does not cause a true reload. Similarly, when you click Read, the same happens to go back to read mode. Unfortunately, this does not update the returnto and returntoquery in the login and signup links. So if you click the tab for VE, then go to login and signup in the top right, you will no longer be in VE when you get back. VE could make a custom solution for this, but a general method might be nice. It's possible to listen to user-initiated navigation (e.g. back/forward) with the popstate event. That could solve the problem for back and forward. However, that doesn't tell you about pushState. So perhaps there should be a mw.pushState that updates these links, then calls the underlying browser method.