-
Notifications
You must be signed in to change notification settings - Fork 83
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
fix(searchbar): changed event listener to click #386
Conversation
Signed-off-by: Gaurav Shandilya <[email protected]>
✅ Deploy Preview for bejewelled-pegasus-b0ce81 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@void-hr Ensure that the button click event does not cause a focus shift by preventing the default behavior and explicitly managing focus. also for Event bubbling If the flickering is due to event bubbling, make sure to stop the propagation of the event to other elements that might be causing the focus shift. |
assets/js/offline-search.js
Outdated
}); | ||
$searchInput.on("keydown", (event) => { | ||
if (event.key === "Enter") { | ||
event.preventDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to prevent the event from bubbling up and use event.stopPropagation() to prevent the event from bubbling further.
searchBar.focus(); | ||
}; | ||
|
||
searchKey.addEventListener("click", () => { | ||
event.preventDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for the hotkey as well.
@void-hr This is hard to review, will you please revert lint changes ? Let's discuss this during the website call on Monday at 5:30 PM IST (7:00 AM CT). Please add it as an agenda item to the meeting minutes. |
3983170
to
4ca1760
Compare
b7824fb
to
9147495
Compare
Signed-off-by: Gaurav Shandilya <[email protected]>
9147495
to
f8a2dcc
Compare
@vishalvivekm, reverted lint changes can you now take a look! |
Thanks @void-hr Please add it as an agenda item to the meeting minutes. |
adding |
@yash37158 how are we doing here? |
Thanks for working on this, @void-hr! |
If you haven't joined the Layer5 Community Slack, yet, I invite you to jump in. |
Thanks for the invite, however I am there from past 2 weeks I guess 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @void-hr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank much @void-hr.
LGTM 😄
Notes for Reviewers
This PR fixes #373
Signed commits