From c295d79f555ebbfa912f013cbbc44ee4c7583f9d Mon Sep 17 00:00:00 2001 From: Bird + Keyboard Date: Wed, 15 Apr 2020 21:25:38 -0400 Subject: [PATCH] Add a check to see if on top of screen This is to fix an issue where the page can be reloaded on the bottom and keys are locked. This is a problem if there are fields in the page. The bug will prevent adding spaces to the field. --- js/vendor/post-header-animationsb146.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/vendor/post-header-animationsb146.js b/js/vendor/post-header-animationsb146.js index 67f2497..566580a 100755 --- a/js/vendor/post-header-animationsb146.js +++ b/js/vendor/post-header-animationsb146.js @@ -38,10 +38,12 @@ } function keydown(e) { - for (var i = keys.length; i--;) { - if (e.keyCode === keys[i]) { - preventDefault(e); - return; + if (window.scrollTop > 5) { + for (var i = keys.length; i--;) { + if (e.keyCode === keys[i]) { + preventDefault(e); + return; + } } } }