aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/views/details_extra.js
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-04-26 21:13:25 +0100
committerDave Arter <davea@mysociety.org>2018-04-30 13:15:29 +0100
commit90a0e3b2a9721e8f913da72a65d193dc54f5b74f (patch)
treef8ceb6ba0b60b261f1c46ce3bda02ef97a0ee59c /www/js/views/details_extra.js
parent54231a6d7873b8fa2756299d8621f72c36ae32b9 (diff)
Don’t skip back twice in navigation
On the details extra/certain submit views, clicking the “Back” button would skip back two screens because the event wasn’t cancelled, causing the newly-shown “Back” button to be triggered.
Diffstat (limited to 'www/js/views/details_extra.js')
-rw-r--r--www/js/views/details_extra.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/www/js/views/details_extra.js b/www/js/views/details_extra.js
index 160ff11..734a27e 100644
--- a/www/js/views/details_extra.js
+++ b/www/js/views/details_extra.js
@@ -21,7 +21,8 @@
this.populateFields();
},
- onClickButtonPrev: function() {
+ onClickButtonPrev: function(e) {
+ e.preventDefault();
this.model.set('hasExtras', 0);
this.updateCurrentReport();
this.navigate( this.prev, true );