misc: apply mini-delay to work around map width error (#74344) #336

Merged
fpeters merged 1 commits from wip/74344-map-condition-erroneous-width into main 2023-05-26 07:42:25 +02:00
1 changed files with 2 additions and 1 deletions

View File

@ -535,7 +535,8 @@ $(function() {
var was_visible = $widget.is(':visible');
$widget.css('display', '');
if ($widget.hasClass('MapWidget') && !was_visible) {
$widget.find('.qommon-map').trigger('qommon:invalidate');
// add mini-delay to workaround wrong width calculation bug
setTimeout(function() { $widget.find('.qommon-map').trigger('qommon:invalidate'); }, 10);
}
} else {
$widget.hide();