There was an error while loading. Please reload this page.
1 parent e8ddd1d commit 8a81779Copy full SHA for 8a81779
1 file changed
packages/script/src/runtime/components/GoogleMaps/ScriptGoogleMaps.vue
@@ -479,9 +479,11 @@ onBeforeUnmount(() => {
479
// so anything after an `await` runs as a detached microtask.
480
// Note: do NOT null mapsApi here — children unmount AFTER onBeforeUnmount
481
// and need mapsApi.value for clearInstanceListeners in their cleanup.
482
+// Note: do NOT remove map DOM here — during page transitions the leave
483
+// animation is still playing, and tearing out the iframe leaves blank
484
+// space. Vue removes the parent element on actual unmount.
485
map.value?.unbindAll()
486
map.value=undefined
-mapEl.value?.firstChild?.remove()
487
libraries.clear()
488
queryToLatLngCache.clear()
489
})
0 commit comments