forgejo/templates
Danko Aleksejevs d483dc674a Reimplement editor Tab handling with accessibility safeguards (#6813)
The primary goal is to balance having the editor work as expected by developers (with Tab key affecting indentation) while also not impeding keyboard navigation.

* Tab indents, Shift+Tab unindents, but only when that indent would be valid. E.g. moving existing list items down or up one level.
* Indenting a selection always works.
* When an "invalid" indent is attempted, nothing happens and a toast is shown with a hint to press again to leave the editor.
* Attempting the same action again allows the textarea lose focus by allowing the browser's default key handler.
* Pressing Esc also loses focus immediately.
* No tab handling happens until the text editor has been interacted with (other than just having been focused).
* Changing indentation in block quotes adds or removes quote levels instead.

Screenshot of the toast being shown:
https://codeberg.org/forgejo/forgejo/attachments/a6287d29-4ce0-4977-aae8-ef1aff2ac89f

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6813
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Danko Aleksejevs <danko@very.lv>
Co-committed-by: Danko Aleksejevs <danko@very.lv>
2025-05-25 19:17:03 +02:00
..
admin feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
api/packages/pypi Update templates/api/packages/pypi/simple.tmpl 2024-04-12 16:43:30 +00:00
base feat(ui): make JS asset load error message translatable (#7388) 2025-04-01 16:14:38 +00:00
custom [FEAT] Repository flags 2024-02-05 16:09:42 +01:00
devtest chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
explore ui: simplify main-attribute labels 2024-12-08 17:30:52 +05:00
htmx Update module github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker to v3 2024-08-09 21:03:37 +02:00
mail feat: consider WebAuthn & SSH for instance signing (#7693) 2025-04-29 10:34:07 +00:00
moderation feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
org feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
package feat(ui): improve description in packages settings (#7531) 2025-04-18 12:36:59 +00:00
projects fix(ui): use gap in switch items (#7581) 2025-04-21 04:25:08 +00:00
repo fix(ui): ensure same width of usercards in grid (#6799) 2025-05-25 13:31:53 +02:00
shared Reimplement editor Tab handling with accessibility safeguards (#6813) 2025-05-25 19:17:03 +02:00
status ui: improve error pages (#7274) 2025-03-28 19:50:43 +00:00
swagger feat: remove API authentication methods that uses the URL query (#7924) 2025-05-23 22:47:43 +02:00
user chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
webhook fix: improve discord webhook api conformance 2024-10-08 22:43:28 +02:00
home.tmpl Split Forgejo landing page template to allow patching or removing Forgejo introduction section (#6675) 2025-02-03 08:41:52 +00:00
home_forgejo.tmpl Split Forgejo landing page template to allow patching or removing Forgejo introduction section (#6675) 2025-02-03 08:41:52 +00:00
install.tmpl Added alt's to <img> 2025-01-31 21:22:00 +00:00
post-install.tmpl [BRANDING] Custom loading animation for Forgejo 2024-02-05 16:02:13 +01:00