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

Click on magnifying glass in search should focus search field #2166

Open
bedengler opened this issue Feb 13, 2024 · 5 comments
Open

Click on magnifying glass in search should focus search field #2166

bedengler opened this issue Feb 13, 2024 · 5 comments

Comments

@bedengler
Copy link
Contributor

I have now watched multiple times users using my application when they wanted to show me something.

When they want to search something (e.g. in a grid), they intuitively click on the magnifying glass icon in the search bar first.
That doesn't work, so they click into the search field itself. That's almost always 2 clicks.

I suggest therefore adding an event to the magnifying glass that focuses the cursor into the search field when clicking on it.

@bedengler bedengler changed the title Usability improvement: Click on magnifying glass in search box has no effect Usability improvement: Click on magnifying glass in search should focus search box Feb 13, 2024
@bedengler bedengler changed the title Usability improvement: Click on magnifying glass in search should focus search box Usability improvement: Click on magnifying glass in search should focus search field Feb 13, 2024
@mvorisek
Copy link
Member

please describe repro steps on any https://ui.atk4.org/demos/ demo

@bedengler
Copy link
Contributor Author

Go to https://ui.agiletoolkit.org/demos/collection/grid.php and click on the magnifying glass of the search field.
Nothing happens.
Click into the search field itself and the cursor jumps into the field and you can start typing.

Expected outcome: when you click on the magnifying glass, the cursor should jump into the search field and you can start typing.

@mvorisek
Copy link
Member

PR welcomed.

https://ui.agiletoolkit.org/demos/form-control/input.php page/demo might be useful as some inputs there have this working.

@mkrecek234
Copy link
Contributor

@bedengler Generally agree, but the magnifying glass today has the function of starting the search already if the search field is not empty. This should be kept as functionality. And I see users doing this instead of pressing enter. We should in case of an improved PR make sure both functionalities are implemented: 1) For empty field setFocus to search field on click 2) For non-empty field, commit form and start search (as today).

@bedengler
Copy link
Contributor Author

bedengler commented Feb 15, 2024

Good point. And fully agree. Should we also take into consideration, if $hasAutoQuery is true or false then?
And keep the functionality of focussing when clicking the magnifying glass if $hasAutoQuery == true?

@mvorisek mvorisek changed the title Usability improvement: Click on magnifying glass in search should focus search field Click on magnifying glass in search should focus search field Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants