File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ function escapeKeyDown(e: KeyboardEvent) {
180180 }
181181}
182182
183- function handerOpenAutoFocus (e : Event ) {
183+ function handleOpenAutoFocus (e : Event ) {
184184 if (! openAutoFocus .value ) {
185185 e ?.preventDefault ();
186186 }
@@ -209,6 +209,12 @@ const getForceMount = computed(() => {
209209 return ! unref (destroyOnClose ) && unref (firstOpened );
210210});
211211
212+ const handleOpened = () => {
213+ requestAnimationFrame (() => {
214+ props .modalApi ?.onOpened ();
215+ });
216+ };
217+
212218function handleClosed() {
213219 isClosed .value = true ;
214220 props .modalApi ?.onClosed ();
@@ -253,8 +259,8 @@ function handleClosed() {
253259 @escape-key-down =" escapeKeyDown"
254260 @focus-outside =" handleFocusOutside"
255261 @interact-outside =" interactOutside"
256- @open-auto-focus =" handerOpenAutoFocus "
257- @opened =" () => modalApi?.onOpened() "
262+ @open-auto-focus =" handleOpenAutoFocus "
263+ @opened =" handleOpened "
258264 @pointer-down-outside =" pointerDownOutside"
259265 >
260266 <DialogHeader
You can’t perform that action at this time.
0 commit comments