feedback icon indicating copy to clipboard operation
feedback copied to clipboard

CTRL+F (browser "search in page") is broken on Linux Firefox

Open JobLeonard opened this issue 4 years ago • 9 comments

Describe the bug

If I press CTRL+F on Firefox to open the "search in page" field it instead advances the caret by one step if a cell is selected

To Reproduce Steps to reproduce the behavior:

  1. Open a cell, make sure it has focus and the caret
  2. press CTRL+F (which should open the "find in page" functionality)

Expected behavior

"Find In Page..." to be opened

Desktop (please complete the following information):

Linux Firefox 89

JobLeonard avatar May 02 '21 18:05 JobLeonard

This is in 'experimental features'

CobusT avatar Jun 07 '21 17:06 CobusT

So I found that one way to make the find-in-page open again is to first click on the right side of a cell, like where I pointed my cursor in the screenshot:

image

After doing that CTRL+F works as expected. Does a cell having focus perhaps capture the keyboard input in a way that intervenes?

However, even though we can open the find-in-page this way, the search behavior is very unreliable: it can't really "forward" search, only "backwards", and even then it add/skips items half of the time.

https://user-images.githubusercontent.com/259840/123060025-a5b81c00-d40a-11eb-88c7-b56dd5754d6b.mp4

Note how the number of found matches toggles between five and six. Chromium-based browsers show the correct seven matches in this notebook I tested without any hassle: image

(remember, this issue shows up in Firefox, Chromium-based browsers don't seem to have this issue - I can't speak for any other browsers than those two)

JobLeonard avatar Jun 23 '21 08:06 JobLeonard

Related: https://github.com/observablehq/feedback/issues/84

mootari avatar Jun 23 '21 12:06 mootari

Reported again in forum https://talk.observablehq.com/t/ctrl-f-moves-the-cursor-forward/5681

tophtucker avatar Oct 13 '21 19:10 tophtucker

We now have a dedicated Find and Replace feature for notebooks https://observablehq.com/@observablehq/release-notes#cell-957

CobusT avatar Dec 02 '21 21:12 CobusT

Why's this closed? It seems like Ctrl+F is still overridden to be "move cursor forward 1 step" (with Ctrl+B being "move cursor back 1 step"), but would anyone ever want that feature? Surely that's what arrow keys are for. I'd much rather have it remain as the native browser find-in-page feature, which is sometimes desirable to use over the custom Find-and-Replace (e.g. I want to search the literal displayed text content of the page). I know I can also use F3, but Ctrl+F is more convenient.

lionel-rowe avatar Dec 06 '23 06:12 lionel-rowe

Agreed. It should not have been closed. Apologies.

CobusT avatar Dec 06 '23 07:12 CobusT

@lionel-rowe Do you see the same override and behavior in the CodeMirror demo editor on https://codemirror.net/ ?

mootari avatar Dec 06 '23 10:12 mootari

@lionel-rowe Do you see the same override and behavior in the CodeMirror demo editor on https://codemirror.net/ ?

No. For me (Chrome 119, Windows 11), that demo editor does override Ctrl+F, but the new functionality is the code editor's own find-and-replace, rather than moving the cursor.

lionel-rowe avatar Dec 06 '23 10:12 lionel-rowe