Proper sticky toolbars on iOS when the keyboard is visible

The Pagecord post editor works pretty well on iOS, but there's been a long-standing issue with the toolbar. The toolbar is "sticky" so if you're editing a long post, the toolbar should pin itself at the top as the page scrolls. This basic CSS works great on a laptop web browser, but on iOS it fails miserably when the virtual keyboard is visible.

I got Gemini to figure out a way to make this work today via a Stimulus controller that prevents the toolbar from being pushed off-screen. It's hacky, and there's some jitter when scrolling, but the benefits of actually being able to see buttons far outweighs this. I've included a video below. It's behind a feature toggle for now, but I can enable it for you if you'd like to try it.

I don't have an Android device so I'm not sure if there's a similar problem that needs to be fixed there (Gemini says not) but do let me know if there is. If you know of a better way to solve this problem, I'm all ears!