feat(core): global form support (#35959)

This commit is contained in:
Aiden Cline
2026-07-08 17:25:34 -05:00
committed by GitHub
parent 79415f625a
commit b44a981eef
17 changed files with 493 additions and 93 deletions
+5 -2
View File
@@ -629,7 +629,7 @@ export function Prompt(props: PromptProps) {
createEffect(() => {
if (!input || input.isDestroyed) return
if (props.visible === false || dialog.stack.length > 0) {
if (props.visible === false || props.disabled || dialog.stack.length > 0) {
if (input.focused) input.blur()
return
}
@@ -1452,7 +1452,10 @@ export function Prompt(props: PromptProps) {
input.cursorColor = theme.text
}, 0)
}}
onMouseDown={(r: MouseEvent) => r.target?.focus()}
onMouseDown={(r: MouseEvent) => {
if (props.disabled) return
r.target?.focus()
}}
focusedBackgroundColor={theme.backgroundElement}
cursorColor={props.disabled ? theme.backgroundElement : theme.text}
syntaxStyle={syntax()}