Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Inconsistent infoWindow bug?

Featured Replies

Hi Gang,

 

Hit a real snag with the width of google.maps.InfoWindow and it's inconsistency of appearance. In IE and FireFox some of the html content decides to have vertical scrolls yet others (often with more content) do. It appears to make no difference how many pins, length of data, which order the array is in, whether I use div, p or a ul the only consistency appears to be the inconsistency. :crazy:

 

Screens attached (top IE 10, bottom FF).

 

Has anyone else seen / had this problem?

 

Edit: Forgot to say works fine in Chrome.

post-36527-0-93274400-1379074108_thumb.jpg

Quick Google came up with these two related issues (with 'answers'), which may or may not fix your issue. Does seem to be a bug on Google's end.

 

http://stackoverflow.com/questions/7769765/why-is-a-scroll-bar-coming-out-in-my-maps-infowindow-in-chrome

 

http://stackoverflow.com/questions/1554893/google-maps-api-v3-infowindow-not-sizing-correctly/11125793#answer-11125793

  • Author

Thanks andy, been to those though and none seem to work. The bit I cannot fathom is why some of the info windows behave like this and some do not yet nothing sets them apart as special.

 

Since posting and I've tested further, it's IE 10+ and FF 23.0.1+ ... strange the old browser behave.

  • Author

OK so my investigation so far has taught me.

 

[ "Elvetham Hotel", 51.3012030447, -0.8800231553, "<div class=\"map-info\"><ul><li><b>Elvetham Hotel</b></li><li>Hook, RG27 8AR</li><li>Distance: 7.64 Miles</li><li><a href='#'>View Details</a></li></ul></div>" ]

This causes the vertical scroll on 'some' of the pins, whereas ...

 

[ "Elvetham Hotel", 51.3012030447, -0.8800231553, "<div class=\"map-info\"><ul><li><b>Elvetham Hotel</b></li><li>Hook, RG27 8AR</li><li>Distance: 7.64 Miles</li><li><a href='#'>View Details</a></li></ul></div>" ]

fits to the window. Jamming   into the spaces fixes this issue and has no detrimental effect to the current working browsers. There is one exception now which is any hyphenated words e.g. stoke-on-trent.

 

For this I have tried using – based on the   bug fix however this does not work and it still gives vertical scroll bars as it 'sometimes' breaks down a line on a hyphenated word.

 

FYI the class .map-info is ...

 

.map-info {
overflow: hidden; line-height: normal;
}
.map-info li {
overflow: hidden;
}

Anyone any ideas?

post-36527-0-14085000-1379320129_thumb.jpg

Have you sent a bug report?! You seem to be making a lot of workarounds here, and it's not your problem!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.