Steps to reproduce: 1. Open a PDF file. 2. Search for a word it contains (using the toolbar that appears when you press 'CTRL+F'). 3. The result is highlighted in the PDF. 4. Now close the search toolbar. Observed result: Note that the search result is still highlighted. Removing this highlight requires one to manually clear the search toolbar before closing it. On pressing 'CTRL+F' again, one sees that the earlier search result is still in the search field. Clearing this clears the highlight. Expected result: The search field text should be cleared on closing the toolbar, so that the search highlight is not shown when the toolbar is not visible.
I like this behaviour. This way I can hide the search bar after typing to save screen space. ("Find all" would be useful.) Additionally, I can easily edit the search query later. Why would it be useful to remove the highlight when closing the search bar? Also interesting: Hover the X sign with the mouse and clear the search field with backspace. Result: The mouse curser becomes invisible
Personally, I feel that it is more in line with the user's expectations to not highlight search terms once the search bar is closed (this is the case in browser 'find' toolbars, for instance). Perhaps there should be a 'minimize' button if the user wants to hide the bar without clearing the field. I'm not sure if I'm missing something, but there is currently no simple way to dismiss both the bar and the search term highlights once I find what I'm searching for. I frequently find myself searching for something, finding what I want, closing the toolbar, and then having to open it again after noticing that the search terms are still highlighted. Even if I were to somehow break this habit, I would still have to manually clear the search field before closing the search bar each time. One way to accomodate both our usecases would be to keep the search term as it is in the search field even after it is closed, but somehow make sure that the terms in the document aren't highlighted when the bar is closed. However, I'm not sure if this would be easy or difficult to implement.
(In reply to Kishore Gopalakrishnan from comment #2) > I'm not sure if I'm missing something, but there is currently no simple way > to dismiss both the bar and the search term highlights once I find what I'm > searching for. Press Esc twice. This is a wishlist and honestly i'm very close to marking it WONTFIX. This is the behaviour Okular has had for more than a decade, unless you can find hordes of people agreeing with you, it means people like the current behaviour.
(In reply to Albert Astals Cid from comment #3) > (In reply to Kishore Gopalakrishnan from comment #2) > > I'm not sure if I'm missing something, but there is currently no simple way > > to dismiss both the bar and the search term highlights once I find what I'm > > searching for. > > Press Esc twice. > > This is a wishlist and honestly i'm very close to marking it WONTFIX. This > is the behaviour Okular has had for more than a decade, unless you can find > hordes of people agreeing with you, it means people like the current > behaviour. Oh okay. That makes sense.
On the web browsers I’ve used (Chrome, Firefox, Epiphany), closing the find bar with text still in it will leave the last-found text highlighted, but with the normal blue text-selection style of highlight. Clicking anywhere will un-highlight the text, just like normal text selection. This would be more familiar and discoverable than pressing Esc twice, which I found only now on this bug page after using Okular for ten months.