-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
[v4] Textarea toolbar button click makes scroll position jump #5906
Comments
Additional issue: when selecting a mark in the toolbar, the panel jumps to the top when scrolled. Test with long content that will expand the textarea below "the fold". |
Is the top issue any different than v3? |
Oh, that's a good question I will have to check. |
I just checked on 3.9 and the behaviour is the same. But I'm sure this was handled differently in earlier versions (like very early v3). |
I really doubt that. Looking at earlier versions e.g. 3.3 it always seems to have been a simple prepend to the cursor selection. Maybe you're thinking of https://github.com/fabianmichael/kirby-markdown-field ? |
The Markdown field is what we usually use because of the highlighting. So yes, that might well be possible. |
Yes and no. The textarea buttons have been quite basic, so I do see that one could request the enhancement that they get smarter. But that'd also mean adding quite some more logic, which could be worth it. But it's not a simple fix or changing it back to how it once was. In fact, with v4 the buttons get a tiny bit smarter: Where in the past wrapping |
Added as idea: https://kirby.nolt.io/588 Will focus this issue on the jumping bug you describe in post # 2 |
The main issue I see it that it generates invalid Markdown which is actually the reason why we provide the buttons to editors in the first place: they are not fluent enough in Markdown to write it blindly. But, please, feel free to consider this a feature request 👍 |
Ah, just saw the Nolt entry. Thanks! |
Description
When editing content in a textarea field, the toolbar creates unexpected Markdown for block elements. Think of this existing content, the pipe being the cursor:
# An example |headline
If I select headline 3 in the toolbar, the following will be created:
# An example ### |headline
Same example as before, if I click headline 1 again to unselect it and make the current line a paragraph again, the following will be created:
# An example # |headline
Expected behavior
The block level elements should alter the Markdown blocks and not thus change the marks at the very beginning of the line.
To reproduce
Your setup
Kirby Version
Kirby 4 Beta 3 on Firefox 119 (macOS Sonoma)
The text was updated successfully, but these errors were encountered: