Skip to content

Commit

Permalink
Merge pull request #52 from surexxx/patch-4
Browse files Browse the repository at this point in the history
Fix the autofocus behavior
  • Loading branch information
furcan authored Apr 5, 2022
2 parents 74b21eb + aa8c9f3 commit a5f7faf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kioskboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@
var docTop = window.document.documentElement.scrollTop || 0;
var inputThreshold = isPlacementTop ? (theInput.clientHeight + 20) : 50;
var theInputOffsetTop = Math.round(inputTop + docTop) - inputThreshold;
var isPaddingTop = theInputOffsetTop < keyboardHeight;
var isPaddingTop = (theInputOffsetTop < keyboardHeight) && isPlacementTop;
var isPaddingBottom = documentHeight <= (theInputOffsetTop + keyboardHeight);

if (isPaddingTop || isPaddingBottom) {
Expand Down

0 comments on commit a5f7faf

Please sign in to comment.