Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
psemenov committed Oct 10, 2023
1 parent c823a81 commit 2e2a2e2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,13 @@ async function load_new_wish() {
});

el.addEventListener("focusin", function (e) {
console.log(Telegram.WebApp.platform);
document.body.style.height = (window.innerHeight + keyboardHeight).toString() + "px";
window.scrollTo({
top: inputFieldRect.bottom - window.innerHeight + keyboardHeight,
behavior: 'smooth'
});
if(["android", "ios"].includes(Telegram.WebApp.platform)) {
document.body.style.height = (window.innerHeight + keyboardHeight).toString() + "px";
window.scrollTo({
top: inputFieldRect.bottom - window.innerHeight + keyboardHeight,
behavior: 'smooth'
});
}
checkInput(e);
});

Expand Down

0 comments on commit 2e2a2e2

Please sign in to comment.