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

Android: RealmScreen unusable in landscape orientation when input is focused. #4386

Closed
chrisbobbe opened this issue Jan 7, 2021 · 3 comments
Labels
a-Android a-onboarding Everything you would do when first joining a realm.

Comments

@chrisbobbe
Copy link
Contributor

chrisbobbe commented Jan 7, 2021

I discovered this while working on #4315, but then I found out that it was happening with or without the changes in #4315.

Reproduction recipe (works for me on the office Android device I'm using, a Samsung Galaxy S9):

  1. Go to the "realm screen", the screen where it says "Enter your Zulip Server URL", in the normal portrait orientation.
  2. Make sure the text input is focused (it should be by default, and it's hard to remove focus; read on for one way I've managed to do so).
  3. Rotate the device into a landscape orientation.
  4. See that the prompt and example input are gone, as in the following screenshot, and the "Enter" button has been renamed "Go". Also, pressing "Go" has no visible effect.

image

Pressing "Go" does seem to have an effect, just not an immediately visible one. After pressing "Go", if I go back to portrait mode, I see the expected result of the action—either an error message like "Cannot connect to server" if I entered an invalid realm, or the auth screen for a valid realm.

The way I was able to see the realm screen without the input being focused is I entered a valid realm, submitted it, then hit "back" from the auth screen. When the input is not focused, things look more as I'd expect them to:

Screenshot_20210107-081748_Zulip-debug

@abhi0504
Copy link
Contributor

abhi0504 commented Jan 7, 2021

@chrisbobbe can I work on this issue ?

@abhi0504
Copy link
Contributor

abhi0504 commented Jan 7, 2021

@chrisbobbe , Actually what is happening that when you change the orientation from portrait to landscape and typed let say for eg "chat.zulip.org" or you typed an invalid URL and presses GO Button ( which is also available in the keypad in the portrait mode ) then it is also working but this time behind the keypad as in landscape mode the keypad covers the whole screen of mobile so we are not able to see the action behind the keypad but it is there .

WhatsApp Image 2021-01-07 at 11 25 40 PM

In different devices there are different keypads available In some keypads it is typed as "GO"(as in above case) in some device "GO" is represented by icon(as in your case).

Also you can verify this thing by entering chat.zulip.org as URL or any URL or leave it blank then change your orientation from portrait to landscape and press "GO" button and now when you again comes back to portrait mode then see the expected result of the action—either an error message like "Cannot connect to server" if you have entered an invalid realm, or the auth screen for a valid realm.

FIX

In my opinion this can be easily fixed by just using the Keyboard.dismiss(); in RealmScreen.js before checking whether the URL we have entered is correct or not .

@chrisbobbe plz comment

abhi0504 added a commit to abhi0504/zulip-mobile that referenced this issue Jan 12, 2021
Actually when the go button(in land scape Orientation) is pressed then there is
 a try and catch statement in "RealmScreen.js" which is asynchronous so we have
to wait but ideal behavior must be this that whatever be the case first of all
keypad must be closed in a synchronized  manner so `Keyborad.remove()` must be
called before the try catch statement.

Fixes: zulip#4386
abhi0504 added a commit to abhi0504/zulip-mobile that referenced this issue Jan 13, 2021
Actually when the go button(in land scape Orientation) is pressed then there is
 a try and catch statement in "RealmScreen.js" which is asynchronous so we have
to wait but ideal behavior must be this that whatever be the case first of all
keypad must be closed in a synchronized  manner so `Keyborad.remove()` must be
called before the try catch statement.

Fixes: zulip#4386
@gnprice gnprice added the a-onboarding Everything you would do when first joining a realm. label Jan 14, 2021
@chrisbobbe
Copy link
Contributor Author

chrisbobbe commented Nov 23, 2022

Probably the thing to try is to not offer that full-screen input UI in the first place. I think that's what TextInput's disableFullscreenUI prop is for? I'm going to try that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-Android a-onboarding Everything you would do when first joining a realm.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants