I have a leaflet map opened and displayed in a Bootstrap3 modal. The map is shown correctly in Chrome and Firefox but when opened in Safari (Version 9.0.3) its zoomed in and only part of it is displayed.
I have tried to change CSS properties based on recommendations here. But there is no effect. Anyone had similar issues with the trio Safari, Bootstrap3 Modals and Leaflet?
EDITED
As @ghybs pointed correctly the use of map.invalidateSize() function had solved the above issue in several other cases. Also I use this function in order to display the leaflet map correctly. And this works fine when in Chrome or Firefox.
My leaflet map lives in a tab inside a modal. I execute the invalidateSize() function when the user changes from the first tab to the second (the one with the map). This is the event I use:
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var tab = $(e.target).attr("href");
if (tab == '#map'){
map.invalidateSize(); ...