Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot navigate with <Home>, <End> key #858

Open
honnip opened this issue Apr 28, 2024 · 5 comments
Open

Cannot navigate with <Home>, <End> key #858

honnip opened this issue Apr 28, 2024 · 5 comments

Comments

@honnip
Copy link
Contributor

honnip commented Apr 28, 2024

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.

@GiantCrocodile
Copy link

GiantCrocodile commented Apr 28, 2024

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.

@zefhemel
Copy link
Collaborator

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.

@honnip
Copy link
Contributor Author

honnip commented Apr 30, 2024

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
Copy link
Contributor Author

honnip commented Apr 30, 2024

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

@GiantCrocodile
Copy link

GiantCrocodile commented May 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants