-
Notifications
You must be signed in to change notification settings - Fork 327
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
Add closing button to search/replace bar #3645
Comments
The search bar responds to the escape key or by clicking outside of it on my system. Is it behaving differently for you? |
I tried escape and it worked. And I retried it and clicking outside of it works as well. I have just had a couple instances where it doesn't go away when clicking and I'm not sure how to replicate it now. At the very least, it might be helpful to add an close button or a note mentioning the escape key |
Maybe one day we can utilize the openDialog addon for codemirror to make a fancier search box: https://codemirror.net/5/doc/manual.html#addon_dialog |
2024-08-17.22-04-22.mp4I found a way to replicate it |
Ah, so if you |
You can use either but you have to click back in the search bar before you are able to. And I didn't know that esc was an option so it wasn't really intuitive for me to click back on the box. I also know that it blocks the first line of text so when I was trying to edit my first line it was more of problem. |
I was impressed that you were able to get your editor window to be scrolled so close to the end of your text. I can't get my scroll to anything less than ~4 lines of text, no matter how i scrunch and stretch my window or how many lines of text i have. It seems it's possible to position the search box at the bottom as just an option on the Codemirror Search library, so maybe we could do that. That said, it seems like it is a bug/oversight on the codemirror 5 library itself. I looked through the Search library source but couldn't spot exactly how the dismissal of the sear box works or where i'd tweak it. Others can chime in, but my gut feeling is that this is not likely going to be fixed unless someone spots a really easy fix. |
Do you think we could intercept this line somehow and modify the cm.phrase to include "Hit escape to close" |
I don't think that really solves the problem, though. If clicking anywhere else on the screen doesn't dismiss it as probably 99% of people would expect, that means it's already too late for hitting The only really fix I think is to make it so it is dismissable regardless of whether the search box is in focus or not. |
We could add a closing button to it, it is using the space for one after all, a little X button at the end should be no problem. |
Your idea:
When you open the search or replace bar (Ctrl+F and Ctrl+Shift+F respectively) there is no way that I could find to close the search bar.
The text was updated successfully, but these errors were encountered: