UX: When navigating on mobile devices, the keyboard opens due to input autofocus #2401

Closed
opened 2026-02-20 01:10:59 -05:00 by deekerman · 10 comments
Owner

Originally created by @gf78 on GitHub (Sep 14, 2025).

Originally assigned to: @gf78, @omerdduran, @james-maschal on GitHub.

1. What is not working as documented?

When a main menu item (search, album, people, etc.) is opened on a mobile device (e.g., Android), the focus is set to the search field, which automatically displays the keyboard.

2. How can we reproduce it?

  1. Open photoprism site on mobile browser (e.g. chrome on andorid)
  2. Authenticate
  3. Select "Album" (or any other main menu item)
  4. Focus is set to search input field
  5. System keyboard is opened and covers approx. 3/5 of the screen height

3. What behavior do you expect?

Since—at least in my opinion—viewing and browsing are more common use cases than searching and filtering, I would like to avoid the keyboard opening automatically.

4. What could be the cause of your problem?

Setting the focus on the search field. Could be caused by the tabindex order #1.

5. Can you provide us with example files for testing, error logs, or screenshots?

see attached. Cursor is blinking in search field

6. Which software versions do you use?

(a) PhotoPrism Architecture & Build Number: 250707-d28b3101e-Linux-AMD64-Plus
(b) Database Type & Version: SQLite
(c) Operating System Types & Versions: Debian
(d) Browser Types & Versions: Chrome
(e) Ad Blockers, Browser Plugins, and/or Firewall Software? none

7. On what kind of device is PhotoPrism installed?

(a) Device / Processor Type: Mini PC, N100, 4 Cores, 16GB
(b) Physical Memory & Swap Space in GB: 1,5TB, 2GB Swap
(c) Storage Type: SSD + NVME

8. Do you use a Reverse Proxy, Firewall, VPN, or CDN?

Nginx Proxy Manger + Pocket ID OIDC

Image

Originally created by @gf78 on GitHub (Sep 14, 2025). Originally assigned to: @gf78, @omerdduran, @james-maschal on GitHub. #### 1. What is not working as documented? When a main menu item (search, album, people, etc.) is opened on a mobile device (e.g., Android), the focus is set to the search field, which automatically displays the keyboard. #### 2. How can we reproduce it? 1. Open photoprism site on mobile browser (e.g. chrome on andorid) 2. Authenticate 3. Select "Album" (or any other main menu item) 4. Focus is set to search input field 5. System keyboard is opened and covers approx. 3/5 of the screen height #### 3. What behavior do you expect? Since—at least in my opinion—viewing and browsing are more common use cases than searching and filtering, I would like to avoid the keyboard opening automatically. #### 4. What could be the cause of your problem? Setting the focus on the search field. Could be caused by the tabindex order #1. #### 5. Can you provide us with example files for testing, error logs, or screenshots? see attached. Cursor is blinking in search field #### 6. Which software versions do you use? (a) PhotoPrism Architecture & Build Number: 250707-d28b3101e-Linux-AMD64-Plus (b) Database Type & Version: SQLite (c) Operating System Types & Versions: Debian (d) Browser Types & Versions: Chrome (e) Ad Blockers, Browser Plugins, and/or Firewall Software? none #### 7. On what kind of device is PhotoPrism installed? (a) Device / Processor Type: Mini PC, N100, 4 Cores, 16GB (b) Physical Memory & Swap Space in GB: 1,5TB, 2GB Swap (c) Storage Type: SSD + NVME #### 8. Do you use a Reverse Proxy, Firewall, VPN, or CDN? Nginx Proxy Manger + Pocket ID OIDC ![Image](https://github.com/user-attachments/assets/4d6ff200-2bf7-41e8-be6a-df60a06fafdd)
deekerman 2026-02-20 01:10:59 -05:00
Author
Owner

@omerdduran commented on GitHub (Sep 16, 2025):

Hi, thank you for reporting this. But I couldn't reproduce it even though I tested it on 2 devices (IOS and Android). I tested it with PWA and multiple browsers (Chrome and Firefox). If you are using PWA, can you turn it off and try again after deleting the cache?

@omerdduran commented on GitHub (Sep 16, 2025): Hi, thank you for reporting this. But I couldn't reproduce it even though I tested it on 2 devices (IOS and Android). I tested it with PWA and multiple browsers (Chrome and Firefox). If you are using PWA, can you turn it off and try again after deleting the cache?
Author
Owner

@gf78 commented on GitHub (Sep 16, 2025):

@omerdduran thank you for checking! I just de-installed the PWA and launched the app on two different samsung phones in the inkognito mode. Still the same effect: When I select e.g. "Persons" from the menu, the page is loaded, the focus is set to the search field (blinking cursor) and the native keyboard is shown. :-/

@gf78 commented on GitHub (Sep 16, 2025): @omerdduran thank you for checking! I just de-installed the PWA and launched the app on two different samsung phones in the inkognito mode. Still the same effect: When I select e.g. "Persons" from the menu, the page is loaded, the focus is set to the search field (blinking cursor) and the native keyboard is shown. :-/
Author
Owner

@james-maschal commented on GitHub (Oct 6, 2025):

Hi, just wanted to comment saying I have the same issues. I just installed Photoprism and was experimenting with the PWA, and I also have the issues described where moving between sections (albums, people, etc), the search bar is auto-selected and the keyboard shows up. I originally was using Vivaldi when I noticed the issue, but I also downloaded and tried this on Chome, Firefox, and Opera. If it helps I am using a Samsung Galaxy S25 running Android 15.

@james-maschal commented on GitHub (Oct 6, 2025): Hi, just wanted to comment saying I have the same issues. I just installed Photoprism and was experimenting with the PWA, and I also have the issues described where moving between sections (albums, people, etc), the search bar is auto-selected and the keyboard shows up. I originally was using Vivaldi when I noticed the issue, but I also downloaded and tried this on Chome, Firefox, and Opera. If it helps I am using a Samsung Galaxy S25 running Android 15.
Author
Owner

@lastzero commented on GitHub (Oct 10, 2025):

It sounds like it could be related to focus management, which is required on desktop browsers to ensure that keyboard events are sent to the currently active component or dialog:

github.com/photoprism/photoprism@5d587cbbf2/frontend/src/common/view.js (L253-L303)

@james-maschal @gf78 Do you see an active input field when this happens? Does manually setting the focus on specific elements help, e.g., by touching them?

@lastzero commented on GitHub (Oct 10, 2025): It sounds like it could be related to focus management, which is required on desktop browsers to ensure that keyboard events are sent to the currently active component or dialog: https://github.com/photoprism/photoprism/blob/5d587cbbf2b94e06e1a920504f567e0f52035e99/frontend/src/common/view.js#L253-L303 @james-maschal @gf78 Do you see an active input field when this happens? Does manually setting the focus on specific elements help, e.g., by touching them?
Author
Owner

@lastzero commented on GitHub (Oct 10, 2025):

Please let me know if this fix works for you. You can test it with the new preview build, which will be available shortly:

Thank you very much!

@lastzero commented on GitHub (Oct 10, 2025): Please let me know if this fix works for you. You can test it with the new preview build, which will be available shortly: - https://docs.photoprism.app/getting-started/updates/#development-preview Thank you very much!
Author
Owner

@gf78 commented on GitHub (Oct 10, 2025):

@lastzero thank you very much. I just tried the preview version and it works now as expeted! 👍👍👍

@gf78 commented on GitHub (Oct 10, 2025): @lastzero thank you very much. I just tried the preview version and it works now as expeted! 👍👍👍
Author
Owner

@james-maschal commented on GitHub (Oct 10, 2025):

I was less fortunate than @gf78 it seems. I used the preview-arm64 image (I am using a Pi for my server), and it did not fix the issue for me. I cleared my browser cache fully (on Vivaldi) just in case, and installed a fresh instance of Firefox to test with. Both still opened the keyboard when switching between categories, as well as refreshing the page.

Do you see an active input field when this happens? Does manually setting the focus on specific elements help, e.g., by touching them?

I am not that familiar with web development, would you please explain this one a bit more? I would love to help if I can!

@james-maschal commented on GitHub (Oct 10, 2025): I was less fortunate than @gf78 it seems. I used the preview-arm64 image (I am using a Pi for my server), and it did not fix the issue for me. I cleared my browser cache fully (on Vivaldi) just in case, and installed a fresh instance of Firefox to test with. Both still opened the keyboard when switching between categories, as well as refreshing the page. > Do you see an active input field when this happens? Does manually setting the focus on specific elements help, e.g., by touching them? I am not that familiar with web development, would you please explain this one a bit more? I would love to help if I can!
Author
Owner

@lastzero commented on GitHub (Oct 11, 2025):

@james-maschal The official tag for our preview build is :preview. Like our stable version, this is a multi-arch build, so you technically don't need any "-arm64" tags unless you have a very old Docker version on your Raspberry Pi? For your convenience, I've manually updated the :preview-arm64 tag so you do not need to use our regular preview image.

@lastzero commented on GitHub (Oct 11, 2025): @james-maschal The official tag for our preview build is [`:preview`](https://hub.docker.com/r/photoprism/photoprism/tags?page=1&name=preview). Like our stable version, this is a multi-arch build, so you technically don't need any "-arm64" tags unless you have a very old Docker version on your Raspberry Pi? For your convenience, I've manually updated the `:preview-arm64` tag so you do not need to use our regular preview image.
Author
Owner

@james-maschal commented on GitHub (Oct 11, 2025):

Thank you for the tip, I've re-pulled the preview-arm64 image and it did fix the issue. Much appreciated!

I was unaware that the main image also supported arm64, I'll keep that in mind! I just upgraded to a Pi 5 and it's been awhile since I've had to deal with arm CPUs :)

@james-maschal commented on GitHub (Oct 11, 2025): Thank you for the tip, I've re-pulled the preview-arm64 image and it did fix the issue. Much appreciated! I was unaware that the main image also supported arm64, I'll keep that in mind! I just upgraded to a Pi 5 and it's been awhile since I've had to deal with arm CPUs :)
Author
Owner

@lastzero commented on GitHub (Oct 11, 2025):

I'm glad it's working for you as well! 👍

@lastzero commented on GitHub (Oct 11, 2025): I'm glad it's working for you as well! 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#2401
No description provided.