This seems to have caused the unwanted effect of not focusing the field in Mobile Safari

Looks like it regressed in
https://github.com/basecamp/fizzy/commit/250935530f86eb628d6b54ec6b7212dac9e76f8b.
Let's see if we can get focus in Safari without sacrificing select in
other browsers by simply moving the nextFrame() call
This commit is contained in:
Jason Zimdars
2025-11-24 17:48:02 -06:00
parent 74cd88d626
commit 0c05694a3c
+1 -1
View File
@@ -65,8 +65,8 @@ export default class extends Controller {
const autofocusElement = element.querySelector("[autofocus]")
await nextFrame()
autofocusElement?.focus()
await nextFrame()
autofocusElement?.select()
}