Skip to content

Commit cfe43f7

Browse files
rueckstiessimlucas
authored andcommitted
COMPASS-144 call stopPropagation() when cancel clicked (#565)
* COMPASS-144 call stopPropagation() when cancel clicked otherwise the event bubbles up to the top and causes the page to reload, which takes the user back to the instance level. * switch to preventDefault() because it’s less invasive.
1 parent 0169f4b commit cfe43f7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/auto-update/index.jade

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#auto-update
22
.btn-group.pull-right
3-
a.btn.btn-primary(data-hook='cancel') Not now
4-
a.btn.btn-primary(data-hook='confirm') Yes please
5-
3+
a.btn.btn-primary(data-hook='cancel', href='#') Not now
4+
a.btn.btn-primary(data-hook='confirm', href='#') Yes please
5+
66
p A newer version of Compass is now available! Would you like to install it and restart Compass?

src/auto-update/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ var NotificationUpdateAvailable = View.extend({
5858
}
5959
});
6060
},
61-
cancel: function() {
61+
cancel: function(evt) {
62+
evt.preventDefault();
6263
this.visible = false;
6364
return false;
6465
},

0 commit comments

Comments
 (0)