Can I disable scoll in my page except for keyboard overlay

Hi there,

On my login page I want to disable scroll because I have only two inputs (login and password) but as there are on the middle of my page they can sometimes be overlaid but the keyboard.

When I disable scroll with scroll=“false” then the auto scroll when keyboard shows doesn’t work.

So my question is, how can I disable scroll on my page except when my keyboard is up ?

Thanks !