Codebryo
Codebryo

Reputation: 198

Leaflet.js Fullscreen API not working in Webkit

While working on the Site http://www.bikemap.net/en/ I wanted to fix a Issue concerning the fullscreen mode of the map. When clicking the Button it results in a full black screen in webkit Browsers. Works correctly in Firefox. Does anyone experienced a similar issue ?

Upvotes: 2

Views: 1001

Answers (1)

Anton
Anton

Reputation: 976

I had the same problem. It took me days to figure out what the problem was. In my case it was that the <div> I wanted to make fullscreen hat the following CSS set:

#mydiv {
    width: auto !important;
}

Some if you set your width to auto WebKit makes it 0 pixels wide in full screen mode! I removed the auto and now everything works fine!

Hope this helps, Anton

Upvotes: 1

Related Questions