From 445b9aded7b0de476d2a5d96a30ea49ee446d03d Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 9 Jun 2021 20:28:13 +0200 Subject: [PATCH] Fix missing break statement for arrow shortcuts. When one presses left key at the first page, `case 37` falls through to `case 39` and the next page is visited. --- sphinx/themes/basic/static/doctools.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sphinx/themes/basic/static/doctools.js b/sphinx/themes/basic/static/doctools.js index 61ac9d266f..8cbf1b161a 100644 --- a/sphinx/themes/basic/static/doctools.js +++ b/sphinx/themes/basic/static/doctools.js @@ -301,12 +301,14 @@ var Documentation = { window.location.href = prevHref; return false; } + break; case 39: // right var nextHref = $('link[rel="next"]').prop('href'); if (nextHref) { window.location.href = nextHref; return false; } + break; } } });