tldr: onBeforeExit doesn't run when clicking back button meaning edits can be lost. This relates to the changes in T217102.
- Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain#/talk while logged in
- Click add discussion
- Type some text in subject
- Click browser back button
- Say "cancel" to the dialog that shows
Expected: I do not leave the overlay and keep my edits
Actual: I leave the overlay and lose my edits
A similar but less severe problem exists in the editor. When opening the editor, entering text and clicking browser back the URL is lost. Clicking back and leave can take them out the site.
QA steps (passed)
Test on Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain
Talk
- Visit a page and click talk button
- Click add discussion
- Type some text in the textarea
- Click the close icon in the top left corner
- Confirmation message appears. Click continue editing
- Confirm you stay in the overlay, the URL remains #/talk/new
- Type text in textarea
- Press browser back button
- Confirm you stay in the overlay, the URL remains #/talk/new
QA (failed)
The following QA step failed and has been pulled into its own bug : T218809
Editor
- Visit a page and click edit
- Type some text in the textarea
- Click the close icon in the top left corner
- Confirmation message appears. Click continue editing
- Confirm you stay in the overlay, the URL remains #/editor/0
- Type text in textarea
- Press browser back button
- Confirm you stay in the overlay, the URL remains #/editor/0