From 34c0d8ce664e917513ee207eb6b651c4f0e667f0 Mon Sep 17 00:00:00 2001 From: Triggs Date: Fri, 29 Dec 2023 14:45:43 -0500 Subject: [PATCH] Change to optional focus function call --- src/utils.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.tsx b/src/utils.tsx index b6ac369b..8510951e 100644 --- a/src/utils.tsx +++ b/src/utils.tsx @@ -235,7 +235,7 @@ export function setCaretPosition(el: HTMLInputElement, caretPos: number) { } // fail city, fortunately this never happens (as far as I've tested) :) - el.focus(); + el.focus?.(); return false; } }