Bug 82502 - Ctrl-F should show or focus the find box, NOT toggle it
Summary: Ctrl-F should show or focus the find box, NOT toggle it
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: ux-advise (show other bugs)
Version:
(earliest affected)
4.2.6.2 release
Hardware: All All
: low minor
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard: target:4.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-12 10:06 UTC by DN
Modified: 2014-09-21 12:53 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DN 2014-08-12 10:06:57 UTC
I'm not sure of the history of this behaviour, given the following:

https://issues.apache.org/ooo/show_bug.cgi?id=109504 (OOo request for the same)
https://bugs.freedesktop.org/show_bug.cgi?id=59101 (subsequent LOo request for toggle behaviour)

As mostly described in the OOo bug, Ctrl-F should not toggle for the following reasons:

* Toggling the find dialogue is unlikely to be the expected behaviour for Ctrl-F for the vast majority of users, based on the following application behaviours:

Firefox: shows/focuses
Chrome: shows/focuses
Internet Explorer: shows/focuses
Word (2013): shows/focuses
Excel (2013): shows/n/a (modal)
Windows Explorer: focuses (always shown)/focuses

* Esc already closes the find bar when focused.

* When a user is used to being able to reliably find using Ctrl-F then typing in other applications (see above examples), if they do the same in LO when the find bar is already shown/focused, they instead end up closing the find bar and overwriting or inserting text in the document.

* The visual indicator for the needed action to search the document currently can be as little as a blinking cursor in the find box (for example in a spreadsheet, where the cell highlight looks identical whether the find box is focused or not.

* Behaviour now:
Find bar showing/unfocused: Ctrl-F focuses, subsequently typing searches
Find bar showing/focused: Ctrl-F closes, subsequently typing inserts/overwrites text in document
Find bar not showing: Ctrl-F shows, subsequently typing searches
To close the find box via keyboard (unfocused): Ctrl-F *twice* (or Ctrl-F, Esc)
To close the find box via keyboard (focused): Ctrl-F *once* (or Esc)


* Behaviour with Ctrl-F configured to show or focus find *only*:
Find bar showing/unfocused: Ctrl-F focuses, subsequently typing searches
Find bar showing/focused: Ctrl-F non-op, subsequently typing searches
Find bar not showing: Ctrl-F shows, subsequently typing searches
To close the find box via keyboard (unfocused): Ctrl-F, Esc
To close the find box via keyboard (focused): Esc (or Ctrl-F, Esc)

The second set of behaviours is better for the following reasons:

* Expected
* Can't result in accidental typing into document dependent on state
* Guaranteed sequence to search document (don't need to look for find box focus)
* Guaranteed sequence to close search box (don't need to look for find box focus)
* No keystroke penalty under any circumstances vs. current behaviour
Comment 1 Cor Nouws 2014-08-12 11:26:18 UTC
Hi,

thanks for your report.
So you simply suggest: "Don't let Ctrl+F close the find bar when it has the focus"
No problem for me, I just wonder why one should hit Ctr-F when the focus is in the find-box already ;)

Cheers
Cor
Comment 2 DN 2014-08-12 21:08:50 UTC
Yep, pretty much :)

Much quicker to find when you don't have to check whether there's a cursor in the find box first and can just hit ctrl-F - and for example when you're context-switching (e.g. composing an email and searching a document for reference) it's pretty easy to be in a position where you don't know straight away whether the find box is focused.
Comment 3 V Stuart Foote 2014-08-25 23:57:06 UTC
Well, as can be seen in bug 59101 one reason for the the adjustment to <Ctrl>+F --Find-- was to make it consistent with behavior of <Ctrl>+H --Find/Replace-- dialog.

Personally I don't care if it is a toggle, e.g. a second <Ctrl>+F or <Crtl>+H, or  just an <Esc> command to close the dialog. As long as UI is consistent in handling these search tools.

But, adding Pedro & Joren for their comment.
Comment 4 Samuel Mehrbrodt (allotropia) 2014-08-26 07:19:03 UTC
I like Firefox' behavior:
When the focus is in the search field and there is some text in it, and you hit Ctrl-F again, the text get selected so you can start a new search.

Closing the search bar with Ctrl-F doesn't make sense to me - why would you do that; you can use ESC.
Comment 5 Jorendc 2014-08-26 10:40:49 UTC
As I said we can't do good for everyone, and as I explained in the other bug report (bug 59101) the behavior is like this:

1) if your focus is on the document, findbar closed
-> ctrl+F opens findbar + focus on findbar

2) if your focus is on the document, findbar opened -> focus to findbar

3) if your focus is on the findbar, press ESC or ctrl+F will close the findbar

I do like this behavior (and it looks like others do share that too). It makes more sense to me to just close it if you are already focused on the findbar (in other cases it'll grab focus/open). But if I'm alone in that opinion feel free to revert my patch. I'll mark it as '0' so someone else has to push it.

Kind regards,
Joren
Comment 6 Cor Nouws 2014-08-26 10:58:05 UTC
(In reply to comment #4)
> I like Firefox' behavior:
> When the focus is in the search field and there is some text in it, and you
> hit Ctrl-F again, the text get selected so you can start a new search.

Is nice indeed.

> Closing the search bar with Ctrl-F doesn't make sense to me - why would you
> do that; you can use ESC.

Ctrl-F is closer then ESC - though I can find the latter without looking of course
Comment 7 Cor Nouws 2014-08-26 11:00:03 UTC
(In reply to comment #5)

> But if I'm alone in that opinion feel free to revert my patch. 

I wouldn't spoil my sleep for this. IMO it's really a minor issue (if any) in the over all great functioning of the find bar.
Comment 8 DN 2014-08-26 11:06:31 UTC
For those who disagree with this bug, please read my rationale and respond to it fully, addressing each of the issues I have raised with current behaviour.

V Stuart Foote - for consistency Ctrl-H behaviour could be adjusted as suggested (when the replace dialogue is open, Ctrl-H does nothing and Esc closes). I did a quick check on my installed editors (Word, Excel and notepad++ on Windows and gedit and Geany on Linux) and at least they all behave like this. Also, on Linux at least, Ctrl-H when Replace is open doesn't close the dialogue, it opens LibreOffice help.
Comment 9 Pedro 2014-08-26 11:34:23 UTC
(In reply to comment #8)
> For those who disagree with this bug, please read my rationale and respond
> to it fully, addressing each of the issues I have raised with current
> behaviour.

I think it makes sense to revert the Ctrl+F to the 4.0 branch behaviour AND remove the toggle from Ctrl+H (for consistency) since Esc is already assigned to dismiss both.

I also think that the Find toolbar should NOT be cleared when dismissed but should keep the last searched string (like the Find & Replace dialog does)

Maybe my original request should have been to remove the toggle from Find&Replace instead of adding it to the Find toolbar. Comparing to the Mozilla Firefox usability I realize now it makes more sense.
I apologize to Joren.
Comment 10 Samuel Mehrbrodt (allotropia) 2014-08-26 20:32:20 UTC
I have updated the patch so that it now selects the text in the search box if you hit Ctrl+F and the search bar is open already.

Concerning the toggle for Ctrl+H: I had a quick look, but that toggle logic is bound to some other dialogs and one would have to check that the other dialogs keep working.
But this is really a minor issue. I suggest creating a new bug for this and making an Easy Hack out of it.
Comment 11 Samuel Mehrbrodt (allotropia) 2014-08-26 20:32:52 UTC
Btw here's the patch: https://gerrit.libreoffice.org/#/c/11110/
Comment 12 Commit Notification 2014-09-21 12:52:02 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fa857d0beb8b7f800131d9f4ef3cfa61d20d39f7

fdo#82502 Ctrl-F should select the text in the search bar, not close it



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.