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

Change window resize handler to switch to/from mobile layout as soon as needed #11656

Merged

Conversation

ClearlyClaire
Copy link
Contributor

Until this PR, window resizing events were handled half a second after the last resizing event, which makes the UI feels laggy when changing screen orientation are reducing the window size.

As it is unlikely that a string of resize events will cross the mobile threshold repeatedly, apply layout changes as soon as crossing that threshold, and otherwise keep delaying height cache clearing to half a second after the last resizing event.

Copy link
Sponsor Member

@ykzts ykzts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected '!==' and instead saw '!='.

app/javascript/mastodon/features/ui/index.js Outdated Show resolved Hide resolved
@Gargron Gargron merged commit bd4099d into mastodon:master Aug 25, 2019
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
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.

3 participants