Manage client-side js with turbo_stream actions

This commit is contained in:
2024-01-22 02:14:01 +01:00
parent 0e8bc18620
commit a7f80a575c
6 changed files with 30 additions and 17 deletions

View File

@@ -23,3 +23,7 @@ Turbo.StreamActions.enable = function() {
e.removeAttribute("tabindex")
})
}
Turbo.StreamActions.focus = function() {
this.targetElements[0].focus({focusVisible: true})
}