|
|
@@ -33,6 +33,10 @@ function init() {
|
|
|
},
|
|
|
close() {
|
|
|
active()?.onClose?.()
|
|
|
+ if (!active()?.onClose) {
|
|
|
+ const promptInput = document.querySelector("[data-component=prompt-input]") as HTMLElement
|
|
|
+ promptInput?.focus()
|
|
|
+ }
|
|
|
setActive(undefined)
|
|
|
},
|
|
|
show(element: DialogElement, owner: Owner, onClose?: () => void) {
|
|
|
@@ -48,7 +52,6 @@ function init() {
|
|
|
open={true}
|
|
|
onOpenChange={(open) => {
|
|
|
if (!open) {
|
|
|
- console.log("closing")
|
|
|
result.close()
|
|
|
}
|
|
|
}}
|