ente-io / ente

Fully open source, End to End Encrypted alternative to Google Photos and Apple Photos
https://ente.io
GNU Affero General Public License v3.0
13.52k stars 716 forks source link

[Bug] Focus search on app start doesn't make the keyboard popup #279

Open brog-io opened 11 months ago

brog-io commented 11 months ago

When opening auth the search bar is focused, but my keyboard doesn't popup. It shows up once I tap the search bar, but that makes the feature somewhat useless. I'm using an Android device and the Samsung keyboard

Niranjan-Dorage commented 10 months ago

is this issue still open? if yes i would like to work on it.

vishnukvmd commented 10 months ago

Thanks for offering to help @Niranjan-Dorage!

This is the starting point, that decides whether or not to show the search bar (that should ideally have auto-focus, but for some reason it doesn't):

https://github.com/ente-io/auth/blob/4dbae7c8fa9f87ab3c34cbfc377ca4c3b2981b98/lib/ui/home_page.dart#L77

Let me know if you have any questions!

Niranjan-Dorage commented 10 months ago

@vishnukvmd sir , just tell me i am right or wrong about your bug :- the bug is when the homepage is pushed (on homepage there is big icon of wallet and 2 buttons scan qr code , enter a setup key) , you want that search icon active which is located at the top-right corner , for now when i reload page search bar is not focused ,,,,,

vishnukvmd commented 10 months ago

Users can opt-in to auto-focus, and the setting is stored within PreferenceService.instance.shouldAutoFocusOnSearchBar().

If this is true, on app-start we should be focusing on the search bar, and bringing up the keyboard so they can start typing.

Currently the keyboard isn't popping up on certain devices.

Niranjan-Dorage commented 10 months ago

ok sir

Niranjan-Dorage commented 10 months ago

its working sir , i have checked it now with latest packages . so , i guess there is no bug , because i have checked with samsung keyboard also ,that setting is working properly . thank you @vishnukvmd sir.

brog-io commented 10 months ago

It's still not working for me, might just be an issue with my device

Niranjan-Dorage commented 10 months ago

yes @brog-io

mmkenry commented 4 months ago

I too having same issue on Android 13 with Gboard.

brog-io commented 3 months ago

Sadly not fixed in V3

brog-io commented 2 months ago

I've switched devices since I reported this bug, and the keyboard still doesn't pop-up. I've also tried multiple different keyboards and got the same issue.

klaas0 commented 2 months ago

I have an Samsung A52s. The search bar gets focused, as it should be, but the keyboard is also not popping up. When I press the search bar myself it does pop up.

I've tested it with the Gboard and with the Samsung keyboard. Both keyboards don't pop up automatically.

klaas0 commented 2 months ago

Since I have this issue myself, I would like to give it a try to fix it. Can someone assign this issue to me? Or is it already assigned to someone else? Niranjan-Dorage has looked into this issue, but he couldn't reproduce it as fas as I can read.

ua741 commented 2 months ago

Since I have this issue myself, I would like to give it a try to fix it. Can someone assign this issue to me? Or is it already assigned to someone else? Niranjan-Dorage has looked into this issue, but he couldn't reproduce it as fas as I can read.

Hey @klaas0 , thank you for offering help. Please feel free to create a PR with a fix for this particular issue :). As far as I know, no one is actively looking into it.

klaas0 commented 2 months ago

@ua741 I have fixed the issue. I created a new branch with my fix, but I can't push. This is my first time contributing to a open source project. So maybe I'm doing something wrong? Please tell me. A link to a tutorial/readme is also fine.

ua741 commented 2 months ago

Hello @klaas0, You will need to fork the ente repo in your personal account. After that, you can push your changes in a branch within your repo. And then create a PR in the ente's repo.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork

klaas0 commented 2 months ago

For those interested. I've created an pull request: https://github.com/ente-io/ente/pull/2232 When this is merged the issue can be closed. (Or maybe we wait for a new release?)

klaas0 commented 2 months ago

Bad news. In the beta version the issue is still not resolved. Very weird, because I created an debug BUILD which worked fine...

ua741 commented 2 months ago

Bad news. In the beta version the issue is still not resolved. Very weird, because I created an debug BUILD which worked fine...

No worries. For testing, you can setup your keystore and run flutter build apk --release --flavor independent -t lib/main.dart. This should create a release build that can be installed on the device.

ua741 commented 2 months ago

Related open issue in Flutter https://github.com/flutter/flutter/issues/122994