summaryrefslogtreecommitdiffstats
path: root/theme/list_lib.js
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2014-07-20 16:48:10 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-25 07:14:39 -0700
commit03df7b989d6d94ca47c7cbdfe90f2702e176f897 (patch)
tree6281274008c6fe90dd1b4be6f9e3d00d0c1d033f /theme/list_lib.js
parentbbe34406123e81e1696305ee63eb95923868dd3b (diff)
downloadsubsurface-03df7b989d6d94ca47c7cbdfe90f2702e176f897.tar.gz
HTML: fix moving to previous dive by keyboard arrows.
If I go to next dive on detailed view, and hit one extra right arrows after reaching the last dive, first click on left does not change the selection, only re-clicking on left does. Fix the number of dives to prevent throwing exceptions and fix moving between dives smoothly. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'theme/list_lib.js')
-rw-r--r--theme/list_lib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/theme/list_lib.js b/theme/list_lib.js
index 2b5931dab..7204746b8 100644
--- a/theme/list_lib.js
+++ b/theme/list_lib.js
@@ -1054,7 +1054,7 @@ function unshowDiveDetails(dive)
function nextDetailedDive()
{
- if (dive_id < items.length) {
+ if (dive_id < items.length - 1) {
showDiveDetails(++dive_id);
}
}