-
Notifications
You must be signed in to change notification settings - Fork 309
ios: Share sheet partly hidden by keyboard, if keyboard was up when message was long-pressed #24
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
Comments
I imagine it's related to the keyboard having been open (because a text input was focused) on the previous route, i.e. the message list. The action sheet is a new, modal, route on the navigation stack; we pop that, so it's going back to the previous route; and then it restores the keyboard state, which seems like a helpful feature in general and is probably intentional. There are probably ways to do this by fighting against the navigation system and that restore-previous-state behavior. Here's a way we can probably do it by cooperating with the navigation system: instead of popping the action-sheet route, we replace it with a new route that's the "share from Zulip" route. That route would do very little except (a) summon the system sharing modal, and (b) serve as a placeholder on the navigation stack, so that any state from the route before the action sheet doesn't try to restore itself until the sharing interaction is complete. |
Thanks for your thoughts, @Khader-1, and for taking the time to make those screen recordings! If I'm understanding correctly, your first screen recording (under "The Problem") doesn't actually show the bug this issue is about:
In a quick test with the 0.0.12 beta just now, on my iPhone running iOS 17.3.1, the behavior closely resembles your screen recording. These steps match the bug report:
but then:
This is much better than a state where you can't use the share sheet because it's covered by the keyboard! 🙂 The brief reappearance and disappearance of the keyboard is unnecessary and would be good to fix, but at least it doesn't make the share sheet unusable. Since the keyboard and the share sheet are both managed by iOS, probably there was an iOS update that fixed this conflict between them. |
With this in mind, I'm going to close this issue, on the theory that it's possible to fix by upgrading to the latest iOS. If someone tries that and still sees behavior matching this issue's description, I'll reopen it. |
@chrisbobbe You're right and thanks for the clarification
Although I couldn't reproduce the bug -I've tried the available devices/simulators to me iOS(17.0, 17.2, 17.4)- but I imagine on older iOS versions the bug might still happen if the behavior remains unchanged. So an easy solution would be to never hide the bottom sheet unless it is no longer in use (which is in this case after the share is done) that's why I proposed the solution. If the issue is ever reopened (hopefully not 😄) we can consider this solution. |
I've filed this as #591. 🙂 |
…sheet We closed issue zulip#24 because it was apparently resolved by an OS update. There's still a milder issue; mention that instead.
…sheet We closed issue zulip#24 because it was apparently resolved by an OS update. There's still a milder issue; mention that instead.
…sheet We closed issue zulip#24 because it was apparently resolved by an OS update. There's still a milder issue; mention that instead.
…sheet We closed issue zulip#24 because it was apparently resolved by an OS update. There's still a milder issue; mention that instead.
…sheet We closed issue zulip#24 because it was apparently resolved by an OS update. There's still a milder issue; mention that instead.
With #12, we'll have a way to share message content outside the Zulip app. 🎉
There's a glitch on iOS: if the topic or content input in the compose box was focused when you long-pressed a message, then this happens:
The keyboard should not reappear when you tap "Share". That seems to be caused by our
Navigator.of(context).pop()
call, which we do at the same time as we request the share sheet from iOS. Probably a fix will involve understanding why that.pop()
call wants to make the keyboard reappear, and changing that behavior.The text was updated successfully, but these errors were encountered: