From 0c05694a3c001c96bdee0ec8c8f4d92f3b302b5c Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Mon, 24 Nov 2025 17:48:02 -0600 Subject: [PATCH] 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 --- app/javascript/controllers/bar_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/controllers/bar_controller.js b/app/javascript/controllers/bar_controller.js index a1fb7e144..5e72e4e07 100644 --- a/app/javascript/controllers/bar_controller.js +++ b/app/javascript/controllers/bar_controller.js @@ -65,8 +65,8 @@ export default class extends Controller { const autofocusElement = element.querySelector("[autofocus]") - await nextFrame() autofocusElement?.focus() + await nextFrame() autofocusElement?.select() }