Skip to content

Instantly share code, notes, and snippets.

@SimonEast
SimonEast / README.md
Last active February 21, 2022 22:05
Fix for Google Maps InfoWindows having unnecessary scrollbars

For most of 2014, the Google Maps API v3 has had a weird bug in that scrollbars often appear unnecessarily in InfoWindows, and they look freakin' ugly.

Lots of people suggest simply putting overflow: visible or overflow: hidden on the DIV but this completely removes the scrollbars which are useful when content is larger than the window. This script attempts to keep that functionality as much as possible.

This is the result of many hours of debugging and re-testing. It's not 100%, but it's super close. Still a work in progress.

View Example HTML

http://bl.ocks.org/SimonEast/raw/16b5bf3d56c0e5035b31/
(should always reflect the latest version from Github)