Skip to content

Commit

Permalink
Back button fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saravahdatipour committed Feb 3, 2025
1 parent 2c54be5 commit 3ddbac1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions webapp/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ function setWindow(window, back) {
}
const backButton = $('#back-button');
backButton.off();
if (back) {
backButton
.click(() => {clearStatus(); setWindow(back); return false;})
.removeClass('button-hidden');
} else if (history.length > 1) {

// Only show back button when on email-confirm window
if (window === 'email-confirm') {
backButton
.click(() => {clearStatus(); history.back(); return false;})
.removeClass('button-hidden');
.click(() => {
clearStatus();
setWindow('email-add');
return false;
})
.removeClass('button-hidden');
} else {
backButton.addClass('button-hidden');
}
Expand Down

0 comments on commit 3ddbac1

Please sign in to comment.