Update external-map.js

This commit is contained in:
andrewcoder002
2021-10-19 09:48:47 +02:00
committed by Maximilian Krög
parent 8f24467ea4
commit f4739df907

View File

@@ -34,11 +34,13 @@ button.addEventListener('click', function () {
mapWindow.addEventListener('load', function () {
const extMapDiv = mapWindow.document.getElementById('map');
map.setTarget(extMapDiv);
extMapDiv.focus();
mapWindow.addEventListener('beforeunload', function () {
localMapTarget.style.height = '';
map.setTarget(localMapTarget);
button.disabled = false;
mapWindow.close();
mapWindow = undefined;
});