Add delay on submitting from welcome view

This commit is contained in:
Matt Rubens 2025-02-14 09:51:50 -05:00
parent 2928c802fc
commit 602c6efbd8

View file

@ -10,7 +10,13 @@ const WelcomeView = () => {
const [errorMessage, setErrorMessage] = useState<string | undefined>(undefined)
const handleSubmit = () => {
const handleSubmit = async () => {
// Focus the active element's parent to trigger blur
document.activeElement?.parentElement?.focus()
// Small delay to let blur events complete
await new Promise((resolve) => setTimeout(resolve, 50))
const error = validateApiConfiguration(apiConfiguration)
if (error) {
setErrorMessage(error)