Skip to content

Commit af0dd3a

Browse files
committed
bug #3034 [Map][Leaflet] Fix InfoWindow auto-opening (Kocal)
This PR was merged into the 2.x branch. Discussion ---------- [Map][Leaflet] Fix InfoWindow auto-opening | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT 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` Commits ------- 1c89254 [Map][Leaflet] Fix InfoWindow auto-opening
2 parents 377a4bc + 1c89254 commit af0dd3a

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)