audiobookshelf-app
audiobookshelf-app copied to clipboard
Add toggle to disable bookmark text auto focus
Brief summary
Adds a toggle for the feature of auto selecting the bookmark text input. The reason being some users (like myself) don't want the keyboard to pop up when setting a bookmark and don't care about the text.
Which issue is fixed?
None
Pull Request Type
Affects both apps. Affects both the frontend and backend of the apps (adds a new item into the device settings data store)
In-depth Description
Recently a change was made to auto select the text input when creating a bookmark. This negatively affected my use of the app as when I'm listening at night I would like to just quickly set a bookmark and then go to sleep. Auto selecting the text input makes the bright keyboard pop up and makes it harder to select create bookmark. I have added a toggle which allows users to disable the auto select so they can go back to how the app worked before. This way it still defaults to the new method but for users that would like to go back they now have an option.
How have you tested this?
- Open the app
- Start listening to an audiobook
- Create a bookmark (This should auto select the text input)
- Go to settings
- Enable the toggle for disable auto focus
- Create a bookmark (This should not auto select the text input)
Screenshots
BEFORE
https://github.com/user-attachments/assets/3a5dd2f8-0a80-4454-a194-cad23a528e92
AFTER
https://github.com/user-attachments/assets/0ae9693c-cb68-4070-bdb9-5006dc4c4105
I don't think something this minor should be a setting. Let me see if there is another solution
I resolved this in #1612 and mentioned we could go for a different design if users prefer the keyboard to open.
I don't think this PR works either because the input had autofocus on it. So the first time it opens it would autofocus even if this setting was enabled.
I agree that this should not be a setting and removing the auto focus entirely is fine, but still feels weird to me to not have a pop-up with only a text box not being auto focused. If we still want an auto focus option, maybe we could have a separate button that is just "create bookmark with current datetime as title" or something.
Is there a reason your keyboard is set to the light theme instead of a dark theme if you don't want a bright white box appearing in the evening/at night?
@advplyr ah yes this resolves it for me. You got to it just before me. I'll close this
@nichwall I know for my case just creating a bookmark with current datetime as title is all I need. I would imagine that's a common usecase