Page MenuHomePhabricator

'Confirm you want to leave' unload message shown when it shouldn't be
Closed, ResolvedPublicBUG REPORT

Description

User story: N/A

Steps to reproduce:

  • go to a page containing depicts tags e.g. https://commons.wikimedia.beta.wmflabs.org/wiki/File:Kinder_spelen-Catchpenny_print_KB-Borms_0554.jpeg
  • click 'mark as prominent' on one of the depicts statements
  • click 'cancel' to return to read mode
  • you'll get a dialog asking 'are you sure? changes will not be saved' - click 'ok'
  • try to reload the page - you'll get a msg saying 'this page is asking you to confirm that you want to leave ...', but you shouldn't be getting the msg because you cancelled your change and none of the data has changed

Acceptance Criteria:

  • leave page confirmation popup not shown when data has not changed

QA Results

ACStatusDetails
1T219771#5096261

Event Timeline

Change 501047 had a related patch set uploaded (by Ha78na; owner: Ha78na):
[mediawiki/extensions/WikibaseMediaInfo@master] Fix 'Discard Changes' and 'Leave Site' alerts

https://gerrit.wikimedia.org/r/501047

Change 501047 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Fix 'Discard Changes' and 'Leave Site' alerts

https://gerrit.wikimedia.org/r/501047

Edtadros subscribed.

**=== Test Result

Status: ✅ PASS
OS: macOS Mojave
Browser: Chrome
Device: MBP

Test Artifact(s):

QA Steps

go to a page containing depicts tags e.g. https://commons.wikimedia.beta.wmflabs.org/wiki/File:Kinder_spelen-Catchpenny_print_KB-Borms_0554.jpeg
click 'mark as prominent' on one of the depicts statements

Screen Shot 2019-04-08 at 10.34.18 PM.png (2×2 px, 2 MB)

click 'cancel' to return to read mode
you'll get a dialog asking 'are you sure? changes will not be saved' - click 'ok'

Screen Shot 2019-04-08 at 10.35.06 PM.png (2×2 px, 2 MB)

try to reload the page - you'll get a msg saying 'this page is asking you to confirm that you want to leave ...', but you shouldn't be getting the msg because you cancelled your change and none of the data has changed
Acceptance Criteria:

✅ leave page confirmation popup not shown when data has not changed
No dialog or popup appeared when the page was reloaded. I also verified that if I didn't click on Ok in the earlier step to dismiss the 'are you sure?' dialog, a popup would appear.

Ramsey-WMF added a subscriber: PDrouin-WMF.

Confirmed that this works on Beta, but the code has not hit test Commons yet. Want to take a look, @PDrouin-WMF ?

Same results as @Ramsey-WMF - works on Beta but not yet on Commons.

works as expected on production