observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

After using 'find' feature, typing in any cell scrolls the page away from active cell #513

Closed saneef closed 1 year ago

saneef commented 1 year ago

Describe the bug Once, I use Find (Find and Replace) to jump to a cell. Every time I type in another cell, the page scrolls to a different place.

To Reproduce Steps to reproduce the behaviour:

  1. Open a long notebook.
  2. Open 'Find and Replace' pane using 'Lens' icon
  3. Search for something which towards the bottom of the page.
  4. Click on one of the search result to jump to that cell.
  5. Dismiss the find pane by clicking 'Lens' icon
  6. Try typing in another cell, preferably one which is in the top of the notebook. The page jumps around when I type.

Expected behaviour The page shouldn't scroll.

Screenshots 📽️ Video

Desktop (please complete the following information):

Additional context This behaviour goes away if I clear the search term from the search field, using 'cross' icon.

Screenshot 2022-12-01 at 10 59 59
CobusT commented 1 year ago

It looks like it keeps on trying to bring the previously searched cell into view. Is that what you see happening?

saneef commented 1 year ago

Looks like it.

CobusT commented 1 year ago

It behaves as if the search panel was still open... when I try the same with the search panel open, it does the same (which may be a bug in any case), but when I close the search panel, I don't get that.

saneef commented 1 year ago

Yes, it is as if the search panel is open. For me, closing the search panel through esc key or clicking on lens icon, get into this behaviour.

I need to clear the search term by clicking the cross icon, to make the problem go away.

Screenshot 2022-12-01 at 10 04 01
saneef commented 1 year ago

Does the search input clear when you close the search panel? It is not for me. The term will still be there. That could be the cause of this issue.

CobusT commented 1 year ago

The search input doesn't clear when I collapse the panel... it is persistent. But I don't get the jumping behavior unless the search panel is open...

Martien commented 1 year ago

It seems indeed the same as #517, so I closed that one.

JobLeonard commented 1 year ago

I also just encountered this. It seems to depend on replace being open too for me, but maybe that's a red herring.

https://user-images.githubusercontent.com/259840/210067965-fa101937-f439-4dd1-9ab1-3c25b421e924.mp4

What's strange is that I definitely also had moments where it happened with the search panel closed (but the fields not being empty), but as you can see that didn't trigger while recording the video

mootari commented 1 year ago

Confirming that I get the jumps to the last find location on every keystroke even with the pane closed if I don't clear the "Find" field.