Skip to content Skip to sidebar Skip to footer

Force Mobile Onscreen Keyboard To Not Be Position Absolute?

I'm developing a chat and it works on desktop but on mobile when you select the textbox and it automatically opens the virtual onscreen keyboard, the onscreen keyboard seems to ove

Solution 1:

calling the function below, passing in the scrolling element as the argument, works in Android mobile devices

functionbottomScroller(scroller) {
    let scrollBottom = scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight;
    scroller.addEventListener('scroll', () => scrollBottom = scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight;
    window.addEventListener('resize', () => scroller.scrollTop = scroller.scrollHeight - scrollBottom - scroller.clientHeight;
};

As for iOS - not sure, as I don't use Apple

Post a Comment for "Force Mobile Onscreen Keyboard To Not Be Position Absolute?"