feat(web): hide the composer while reading history on narrow screens - #17
Open
Antisophy wants to merge 1 commit into
Open
feat(web): hide the composer while reading history on narrow screens#17Antisophy wants to merge 1 commit into
Antisophy wants to merge 1 commit into
Conversation
iOS pins the composer above the on-screen keyboard, then lets the two drift apart as soon as the page scrolls: the box ends up floating over a gap, and only a drag that starts inside it puts them back together. The page cannot see that drift, so there is nothing to correct against. Scrolling up to read is also the moment neither the composer nor the keyboard is wanted, so leaving the bottom of the message list now hides the composer and blurs the field, which is what actually dismisses the keyboard. Returning to the bottom brings the box back; iOS will not raise the keyboard again without a tap, so that stays manual. Hiding is display:none on a component that stays mounted, so a draft in progress survives. Scoped to the same 768px breakpoint the rest of the mobile layout uses: wider screens have room for the composer and no keyboard to dismiss.
Contributor
Author
|
One of five independent changes for using cydo on a phone, split apart so each can be judged on its own:
They touch different code and can merge in any order. #15 and #17 both add rules inside the same |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
iOS pins the composer above the on-screen keyboard, then lets the two drift apart as soon as the page scrolls: the box ends up floating over a gap between itself and the keyboard, and only a drag that starts inside the box puts them back together. The page cannot observe that drift, so there is nothing to correct against from script.
Scrolling up to read is also the moment when neither the composer nor the keyboard is wanted, so this leans into that: leaving the bottom of the message list hides the composer and blurs the field, which is what actually dismisses the keyboard. Returning to the bottom brings the box back.
Details worth knowing:
display: noneon a component that stays mounted, so a draft in progress survives being scrolled away from.MessageListgains anonAtBottomChangecallback, fired from the scroll listener it already runs foroverflow-anchor, with 24px of tolerance so momentum scrolling landing a pixel off zero does not toggle it.