GNOME Bugzilla – Bug 760100
Closing OSM Account dialog without logging in should cancel editing
Last modified: 2016-01-04 08:50:24 UTC
To reproduce: Start off not logged into OSM Right click on the map -> What's here? Edit button The account dialog opens Hit the account dialog close button without logging in Actual outcome: Advance to the editing window Expected outcome: Return to the map In placeBubble.js: if (!response === OSMAccountDialog.Response.SIGNED_IN) return; this compares !response (false) to OSMAccountDialog.Response.SIGNED_IN (0) so doesn't return. Patch replaces this with: if (response !== OSMAccountDialog.Response.SIGNED_IN) return;
Created attachment 318187 [details] [review] Cancel editing if OSM Account dialog closes without logging in The response of the OSM Account dialog isn't being handled correctly, so the edit window opens !response is being compared with ===, rather than response being compared using !==. !response is false, not a number. Change (!response === OSMAccountDialog.Response.SIGNED_IN) to (response !== OSMAccountDialog.Response.SIGNED_IN)
Review of attachment 318187 [details] [review]: Thanks a lot for this fix! I will commit this with some changes to the commit message. If you want to see what GNOME feels is a nice commit message, read this: https://wiki.gnome.org/Git/CommitMessages Thanks again!
Pushed as: https://git.gnome.org/browse/gnome-maps/commit/?id=ca7dc73cd99efa0d63157e4ed5631e191d9db92a