SUMMARY When opening the "Find in Files" panel, the search field will almost always contain some text - either the "word" the text editor cursor is currently in, a text is selected in the editor, or a previous search (which is OK and not a problem). When that is the case, the text in the search box is pre-selected (which is also very much OK and I appreciate the convenience). If I want to dismiss the "Find in files" panel, I expect I can do that by pressing ESC, but that does nothing. Pressing ESC a second time dismisses the panel. STEPS TO REPRODUCE 1. Open kate with some text file. 2. Select some text. 3. Press CTRL+SHIFT+F to open the "Find in files" panel. 4. Press ESC OBSERVED RESULT Nothing happens EXPECTED RESULT The "Find in files" panel should close. SOFTWARE/OS VERSIONS Operating System: KDE neon Testing Edition KDE Plasma Version: 6.0.0 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: 6.5.0-17-generic (64-bit) Graphics Platform: Wayland Processors: 20 × 12th Gen Intel® Core™ i7-12700H Memory: 31.0 GiB of RAM Graphics Processor: Mesa Intel® Graphics ADDITIONAL INFORMATION * Just unselecting the text (for example by pressing the left or right arrow key) does not workaround the issue - you still need two ESC keys to close the panel. * Changing the search box text introduces another interesting behavior, which I'm not sure if it is intentional or not (I don't remember if it used to be like that): after typing, the search options part of the panel is replaced with the search results view that shows matches in the current file - if the text entered exists in the current document, the search results will have entries with checkboxes that are all checked, and then pressing ESC will first uncheck all the checkboxes and the second ESC will close the panel. If there are no search results in the current document than the first ESC will close the panel. I have a feeling that this behavior is related to the same issue - maybe after opening the panel there are search results hidden behind the search options and the first ESC clears their invisible checkboxes. Bug #160696 is where the "close on ESC" functionality was first introduced.
Its working as expected. When you select a word and hit Ctrl+Shift+F -> it opens the panel and triggers a search. If you then hit Esc, -> it checks if there are results and they are 'checked' and unchecks them -> If you hit Esc again, it will close the panel because there is nothing to uncheck now.
Created attachment 166042 [details] screenshot showing the find in files panel as it first opens I'm a bit hazy on the purpose of the checkboxes - though I assume they have purpose - but the problem is that when the "Find in files" panel first appears (see screenshot), the search results with the checkboxes are not visible. If the user then presses ESC, nothing changes and it looks like the first ESC is just ignored.
> I'm a bit hazy on the purpose of the checkboxes - though I assume they have purpose They are used when replacing text.
The original reason for not closing is that the first Esc removes the search result highlights (in case they are distracting)
(In reply to Kåre Särs from comment #4) > The original reason for not closing is that the first Esc removes the search > result highlights (in case they are distracting) As noted before - the problem is that when search results are hidden behind the search options view, nothing visible happens when you press ESC the first time. This is very confusing. At least the search options view should be hidden as well, on the first ESC.
If you have multiple matches visible at the same time and no selected word in the current document, it is quite obvious what happens when you press Esc the first time, but I can agree that if there is only the selected word that matches, it is quite hard to notice as the selection or the common word-highlight covers the match highlight. Unfortunately, I don't have any idea on how to accommodate both scenarios.... I think the separate de-selection and clearing of highlights are quite important features.