silverbullet icon indicating copy to clipboard operation
silverbullet copied to clipboard

Cannot navigate with <Home>, <End> key

Open honnip opened this issue 9 months ago • 5 comments

I often navigate pages with the home, end keys, but I've found that doesn't work in silverbullet. Pressing Home should navigate to the beginning of the page, and pressing End should do the opposite.

honnip avatar Apr 28 '24 02:04 honnip

I noticed a similar thing: I would like to be able to press ESC within a text field/block to edit the editing and get back to the rendered view (like cancel editing/undo your change). This would be similar to closing popups with ESC in other applications or other web apps.

Page Down button doesn't behave as expected as well.

GiantCrocodile avatar Apr 28 '24 09:04 GiantCrocodile

These are different issues. I don't have a home or end button on my keyboard to test this, but I'd assume they'd go to the start and end of the line. This would be my expectation, they don't do that?

As to the escape key, these should close modals pretty much always. When I open the page picker and hit Esc for instance, it closes and goes back to the editor, that doesn't happen for you?

PageDown also just pages down one page in the editor for me.

zefhemel avatar Apr 30 '24 13:04 zefhemel

Yes, PageUp and PageDown work as expected for me too. It scrolls a single page.

I don't have a home or end button on my keyboard to test this, but I'd assume they'd go to the start and end of the line. This would be my expectation, they don't do that?

I too believe that if the cursor is in the editor, it should move to the start or end of the line, but if it is not, the page view should move.

honnip avatar Apr 30 '24 14:04 honnip

ESC works fine, but I think @GiantCrocodile means the action of removing the cursor from the editor.

honnip avatar Apr 30 '24 14:04 honnip

Sorry for my late reply and that the description of what I meant wasn't clear. I would like to press ESC to be able to switch from this view (edit mode): grafik

back to (rendered view/no edit mode):

grafik

Regarding Page down button: When I do it at the top of the tutorial page (like where I took the screenshots from), pressing Page Down gets me from view/read mode into the include block: where editing is active:

```include
raw: "[[!silverbullet.md/Getting Started]]"

and when I press another time Page Down, I get out of the edit view of the include block and into the view/read only mode at the bottom of the page. So somehow it works but it's behaving weird. Expected behavior would be to just scroll down without triggering any edit mode. Page Up behaves the same.

I tested this under Win11 with latest Firefox. Maybe it behaves different per OS/browser.

GiantCrocodile avatar May 02 '24 08:05 GiantCrocodile