Feat/search submit - #693
Open
2xburnt wants to merge 2 commits into
Open
Conversation
Allow search dialogs to submit with Enter and select existing input values for quick replacement. Co-authored-by: Cursor <cursoragent@cursor.com>
Stop modal click propagation without cancelling the browser's form-submit default action. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the search modal in
NavbarSearch.vueto improve accessibility and user experience, and to ensure proper form handling. The main changes include replacing the modal container with a form, improving event handling, and enhancing the search input usability.Form Handling and Event Management
divto aformelement and updated the confirm button to usetype="submit", allowing the search to be triggered by both button click and pressing Enter. The form submission is now handled by theconfirmmethod, and the@clickhandler was updated to@submit.prevent="confirm". [1] [2]preventClickfunction with a newstopClickfunction that usesevent.stopPropagation()for better event management within the modal.Input Usability Improvements
selectValuefunction and attached it to the search input's@focusand@clickevents, so the input value is automatically selected when the field is clicked or focused, making it easier for users to replace the existing query. [1] [2]