Skip to content

Commit 93db6aa

Browse files
committed
[Map][Leaflet] Fix InfoWindow auto-opening
While writing E2E tests for UX Map, I noticed that I wasn't able to automatically open an InfoWindow (Popup) when using Leaflet, with `opened: true`
1 parent 377a4bc commit 93db6aa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Map/src/Bridge/Leaflet/assets/dist/map_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ var map_controller_default = class extends abstract_map_controller_default {
307307
if (autoClose) {
308308
this.closePopups();
309309
}
310-
element.openPopup();
310+
setTimeout(() => element.openPopup(), 0);
311311
}
312312
const popup = element.getPopup();
313313
if (!popup) {

src/Map/src/Bridge/Leaflet/assets/src/map_controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export default class extends AbstractMapController<
266266
this.closePopups();
267267
}
268268

269-
element.openPopup();
269+
setTimeout(() => element.openPopup(), 0);
270270
}
271271

272272
const popup = element.getPopup();

0 commit comments

Comments
 (0)