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

Fix compose form behavior in mobile view #15555

Merged
merged 3 commits into from
Mar 24, 2021

Conversation

ClearlyClaire
Copy link
Contributor

Fixes #13094

Until this PR, when writing toots in mobile view, two ComposeForm components were rendered:

  • one in the compose pane hidden by CSS
  • one corresponding to the /web/statuses/new path

The auto-focus and auto-selection code was executed on the hidden ComposeForm (causing a crash in PaleMoon, see #13094) and wasn't executed on the displayed ComposeForm component.

This PR uses media queries to decide whether to render the compose pane's ComposeForm, avoiding unnecessary rendering the hidden component and avoiding the PaleMoon crash, and makes it so the auto-selection and auto-focus code gets executed when replying to toots in mobile view.

Base automatically changed from master to main January 20, 2021 10:31
@ClearlyClaire
Copy link
Contributor Author

ping @Gargron

@Gargron Gargron merged commit 034f37b into mastodon:main Mar 24, 2021
chrisguida pushed a commit to Start9Labs/mastodon that referenced this pull request Feb 26, 2022
* Fix ComposeForm being mounted twice in mobile view

Fixes mastodon#13094

* Fix compose form focus and pre-selection behavior in mobile view

* Split _updateFocusAndSelection out of componentDidUpdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reply form not work in Pale Moon
2 participants