From 67c7de9abad04780babd7c8b3cf1232e2eb57c21 Mon Sep 17 00:00:00 2001 From: otrok7 <50595291+otrok7@users.noreply.github.com> Date: Mon, 19 Aug 2024 23:36:59 +0200 Subject: [PATCH] stabilize crouton_map searches --- croutonjs/meetingMap/js/meeting_map.js | 4 ++-- croutonjs/src/js/crouton-core.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/croutonjs/meetingMap/js/meeting_map.js b/croutonjs/meetingMap/js/meeting_map.js index b2c90835..47055474 100644 --- a/croutonjs/meetingMap/js/meeting_map.js +++ b/croutonjs/meetingMap/js/meeting_map.js @@ -218,11 +218,11 @@ function MeetingMap(inConfig) { retrieveGeolocation().then(position => { showThrobber(); crouton.searchByCoordinates(position.latitude, position.longitude, config.map_search.width); + if (activeModal == gSearchModal) closeModalWindow(gSearchModal); }).catch(error => { console.error(error.message); + if (activeModal != gSearchModal) showBmltSearchDialog(); }); - showBmltSearchDialog(); - closeModalWindow(gSearchModal); }; function clickSearch(e) { gDelegate.clickSearch(e, function(lat,lng) { diff --git a/croutonjs/src/js/crouton-core.js b/croutonjs/src/js/crouton-core.js index 0e907b4c..a2afa204 100644 --- a/croutonjs/src/js/crouton-core.js +++ b/croutonjs/src/js/crouton-core.js @@ -898,7 +898,6 @@ function Crouton(config) { window.croutonMap = new MeetingMap(self.config); if (self.config['map_search']) self.searchMap(); } - self.meetingSearch(); } Crouton.prototype.setConfig = function(config) {