-
-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS - Sticky toolbar does not stick #223
Comments
Safari is the new IE, as they say. One problem here is that my scroll handler (which determines when menubar is leaving the viewport and should be floated) is only called after the whole scroll finishes, rather than, as it is on desktop browsers, repeatedly during scrolling. So it can't really do its job in this case. But sometimes the bar ends up in a bogus position (200-500 pixels above the viewport), even after scrolling has finished. Its css says I think these are bad enough to recommend not enabling a floating menubar on mobile Safari. I could find lots of talk about these issues online, but no workaround — the general recommendation was not to rely on position: fixed in Mobile Safari. |
@marijnh Thanks for looking into it. We were hoping we could perhaps use it in a version 1 but it looks like we will need to take it all the way to a native toolbar out of the gate. |
The workaround 🙈 seems to be doing a manual I could try to make a PR to move my fix upstream. Should it sniff mobile safari? |
Don't debounced scroll events produce a very noticeable and annoying jittering of the positioned element? Especially on mobile, where scroll events arent fired immediately, the thing will be scrolled far out of view and then snap back. |
You're right, that debounce was premature optimization. It's smoother and better without. Still a bit jittery. |
I am surprised you're able to get anywhere near smooth with that technique. But if you can turn it into a relatively functional fallback that the module uses on iOS, I'd definitely be interested in a patch. |
@marijnh - we hacked in a solution that really does not work very well. We will go native toolbar on this for the time being. |
Moved to ProseMirror/prosemirror-menu#3 |
iPhone 6s Plus, iOS 9.2.1, PM version 0.4.0
Expected result:
Toolbar stays visible and fixed upon scrolling.
Actual result:
Toolbar becomes invisible and blinks off and on upon scrolling.
The text was updated successfully, but these errors were encountered: