We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5d9534 commit 6733f47Copy full SHA for 6733f47
js/playfield.js
@@ -167,9 +167,13 @@ window.addEventListener("load", function(){
167
playfieldsLoaded = true;
168
});
169
170
-window.addEventListener("keypress", function(){
171
- var next = document.getElementsByClassName("next-page")[0].href;
172
- if (!(undefined === next | !next | next.length === 0)) {
173
- window.location.href = next;
+window.addEventListener("keypress", function(event){
+ if (event.which === 13 || event.keyCode === 13) {
+ var next = document.getElementsByClassName("next-page")[0].href;
+ if (!(undefined === next || !next || next.length === 0)) {
174
+ window.location.href = next;
175
+ }
176
+ return false;
177
}
178
+ return true;
179
0 commit comments