Skip to content
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

Composer goes off screen on iOS when starting to type #2652

Closed
matteocontrini opened this issue Mar 2, 2021 · 2 comments · Fixed by #2660
Closed

Composer goes off screen on iOS when starting to type #2652

matteocontrini opened this issue Mar 2, 2021 · 2 comments · Fixed by #2660
Assignees
Labels

Comments

@matteocontrini
Copy link
Contributor

Bug Report

Current Behavior

After #2279 and #2631 were applied, when replying to a discussion on iOS by tapping the "reply" area at the bottom of a discussion, it happens that when the user starts typing the composer goes off the screen, even if its position is fixed, and the user needs to scroll up.

Steps to Reproduce

  1. Go to a forum on nightly with Safari on iOS
  2. Open a discussion
  3. Tap the "reply" area at the bottom
  4. Tap the composer textbox and start writing
  5. Sometimes: the page will scroll to the bottom and the composer will go off screen, forcing you to scroll up manually

Expected Behavior

The composer should be fixed at the top.

Screenshots

ezgif-com-video-to-gif

Environment

I'll ask the iOS user reporting this to test on nightly.flarum.site to see if it might be an extension or something else on my forum causing this.

@matteocontrini
Copy link
Contributor Author

Confirmed on nightly. It doesn't happen always but most of the times, also on iPad although it just bumps a bit.

IMG_1920.MP4

@SychO9
Copy link
Member

SychO9 commented Mar 2, 2021

Thank you!

Did some research, I now understand why the composer was initially using position: absolute, fixed position with the virtual keyboard just doesn't work on iOS.

https://medium.com/@im_rahul/safari-and-position-fixed-978122be5f29
https://gist.github.com/avesus/957889b4941239490c6c441adbe32398#:~:text=Mobile%20Safari%20does%20not%20support,%2C%20focus%20%2C%20and%20blur%20events.

I don't think we should revert back to absolute positioning though, as that fixed a couple of annoying issues. What we should do is only apply the old absolute positioning for iOS users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants