Skip to content

Commit

Permalink
make pressing tab add two spaces in text areas
Browse files Browse the repository at this point in the history
  • Loading branch information
loudar committed Jul 24, 2024
1 parent 1324ee7 commit 02437b1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ui/templates/generic.templates.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,12 @@ export class GenericTemplates {
.classes("full-width")
.name(id)
.id(id)
.onkeydown(e => {
if (e.key === "Tab") {
e.preventDefault();
e.target.value += " ";
}
})
.oninput((e) => {
oninput(e.target.value);
})
Expand Down

0 comments on commit 02437b1

Please sign in to comment.