diff options
author | tdro <tdro@noreply.example.com> | 2022-05-29 23:04:30 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-05-29 23:04:30 -0400 |
commit | a7ae254e947d74dac5d3cbb28469f89ac0947ad8 (patch) | |
tree | 95234bcfff577044113020c9db72c1a8d3f0a774 /static | |
parent | 9df9c3cb248cd77fa24fd904c462563b24914de0 (diff) | |
download | canory-a7ae254e947d74dac5d3cbb28469f89ac0947ad8.tar.gz canory-a7ae254e947d74dac5d3cbb28469f89ac0947ad8.tar.bz2 canory-a7ae254e947d74dac5d3cbb28469f89ac0947ad8.zip |
static/js/pager: Handle new tab condition
Allow default when there is nothing in history.
Diffstat (limited to 'static')
-rw-r--r-- | static/js/pager.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/static/js/pager.ts b/static/js/pager.ts index 63b780d..f01de10 100644 --- a/static/js/pager.ts +++ b/static/js/pager.ts @@ -37,6 +37,7 @@ window.scrollTo(0, 0); } if (document.body.contains(back) && back.contains(event.target)) { + if (history.length < 2) return; event.preventDefault(); history.go(-1); } |