You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
Describe the bug
Using the search can leave the app in an inconsistent state. If the search gets canceled, using the back button (top left), the keyboard is shown on the "Home" page. Entered text is not visible, but the error messages from the search are shown. E.g. if I enter less than three characters, the corresponding error is shown on the "Home" page (see screenshot 1). The menu is also affected by this mixed state and shows incorrect padding (see screenshot 2).
To Reproduce
Steps to reproduce the behavior:
Go back and forth between the search and other pages several times.
Switch to the search again and use the back button (top left).
See the keyboard on "Home" page. If the keyboard is not shown, go back to step 1.
Open the menu to see the incorrect padding.
Expected behavior
The keyboard is not shown on the "Home" page, and there should be no change to the menu.
Screenshots
Smartphone :
Phone: Redmi Note 8 Pro
OS version: 11 RP1A.200720.011
Language: German
Additional context
I also occasionally experienced random app crashes in this state, which could be related to #1517.
The text was updated successfully, but these errors were encountered:
I tried to find the reason behind the problem and after a lot of logging this is what I found out :
Most of the time when clicking on the back button in the SearchFragment, the MainFragment (for the first screen of the app) is created. But Sometimes, for a reason I'm still unsure of, it creates a new Search fragment and then creates a new Main fragment (in quick succession, so quick that you don't see it happen) which explains why the keyboard problem appears.
The problem isn't that the keyboard doesn't disappear, it's that the OnViewCreated of the SearchFragment calls the ShowKeyboard() function (which is supposed to hide when user presses on back but it doesn't happen in this case).
The drawer having a big top padding appear is directly related to the keyboard being on screen (you can try this out by removing the hideKeyboard() call in the SearchFragment backIcon behaviour
Bandaid fix
I can put out a pull request but I think the fix I found is more of a bandaid fix as I didn't find the real reason this edge case happens. When this situation happens the onViewCreated function of the SearchFragment is called but not the OnCreate() function. Using a boolean that is initialized to false that is set to true when onViewCreated finishes executing blocks any further unwanted behaviour and seems to cause the problem to not happen anymore from the tests I run.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
Using the search can leave the app in an inconsistent state. If the search gets canceled, using the back button (top left), the keyboard is shown on the "Home" page. Entered text is not visible, but the error messages from the search are shown. E.g. if I enter less than three characters, the corresponding error is shown on the "Home" page (see screenshot 1). The menu is also affected by this mixed state and shows incorrect padding (see screenshot 2).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The keyboard is not shown on the "Home" page, and there should be no change to the menu.
Screenshots
Smartphone :
Additional context
I also occasionally experienced random app crashes in this state, which could be related to #1517.
The text was updated successfully, but these errors were encountered: