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

[SearchUtilities] Add setting to change how the searchbar cursor focuses on hotkey #381

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

hackerTiger21
Copy link

Fixes #366

Adds a checkbox setting in General -> Sidebar to toggle between original re621 behavior (focusing the cursor to the beginning of the query) and vanilla e621 behavior (focusing the cursor to the end of the query).

Adds implementation of behavior switching within event handler.

Added checkbox option in settings menu to switch cursor behavior

Implemented the behavior in the event handler
This is my first time doing TypeScript
Previous method didn't work with triggering focus at first.
Current implementation doesn't work, need to do some more digging with how the event handler and its dependencies work.
The setting can't be pulled from inside the event handler, so I'll have to create two separate event handlers and find a way to switch between them.
Ended up not needing multiple event handlers. I could simply pass in a module-level variable that gets set by the Settings value, which I could then read inside the single event handler.
@hackerTiger21 hackerTiger21 marked this pull request as ready for review September 29, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement request: allow the user to more finely control the behavior of the Search hotkey
1 participant