I know the effect of hiding the addressbar in some browser on scrolling with my fingers like this:

I like this as this opens more space for the webapp.
Now this works in my webapp. But I have made an input field on my site which on focus scrolls the page and sticks the input as a top bar (fixed).
Ok that works of course, but I am wondering if there is any possibility to move the address bar with the on focus scroll event ("scrollTop") away as the body scrolls. When I scroll the body with my fingers the address bare scrolls away (as the gif above shows), but when I implement the same behavior with scrollTop it does not hide.
Any Ideas?
btw. I do not want to use the fullscreen api