I have a map with popups enabled. In the popups I am trying to show a node's title and a small thumbnail. Every time I reload a page with a map on it, I always observe the same behavior:
1) I click on a marker, the popup shows up but only part of the content is visible and scroll bars also appear - as if the "overflow" property of the overlay is set to "scroll". See the first screenshot for an example.
2) I close the popup and click on the marker again. This time the popup is sized correctly around the content and no scroll bars pollute the map ;-) See the second screenshot for an example.

Basically I open a popup, it has scroll bars, then I close it and re-open it and the scroll bars are gone.

Any ideas why this is happening?

I looked at the openlayers_style.css provided with the module and the only mentioning of the word "popup" is here:

.olPopupContent {
    padding:5px;
    overflow: auto;
} 

I changed the overflow from "auto" to "visible" but that seems to have no effect.

Tested on the latest Chrome v23, FF17 with the same effect. In IE9 the issue is not observed. I am using Corolla theme.

Thanks!

CommentFileSizeAuthor
good.png88.01 KBkirilius
bad.png80.15 KBkirilius

Comments

kirilius’s picture

I figured this out by trial and error. The issue was caused by the theme and should be closed now.

nigelw’s picture

Version: 7.x-2.0-beta1 » 6.x-1.0-beta2

kirilius can you share exactly what you did to remedy this? I am having the same issue.

kirilius’s picture

Hmmm, I was too quick to say the problem was gone. I noticed that my the base theme for Corolla (Adaptive Core) was not enabled. I enabled it and the problem disappeared for a while. But not it happens again!

It behaves quite arbitrarily. Sometimes I see the correct behavior but most of the time it is what I described in the post above.

kirilius’s picture

Hi there, any ideas? Does this mean that OpenLayers popups are not usable at this moment?

kirilius’s picture

Version: 6.x-1.0-beta2 » 7.x-2.0-beta1

For some reason the version of OpenLayers in the issue got changed. Switching back to 7.x.

Any updates?

kirilius’s picture

Hi there is there anybody else experiencing the same issue? Any ideas how to fix this?

cyprien2’s picture

Exactly the same problem here...
When i clear cache of the browser, the scrollbars appears.
This method (for 6.x version) doesn't work.
Any ideas ?

cyprien2’s picture

Ok, i've found the problem for me. It comes from the normalize.css.
It was comming with the tag img.
Original code :

img {
  /* Remove border when inside `a` element in IE 8/9. */
  border: 0;
  /* Improve image quality when scaled in IE 7. */
  -ms-interpolation-mode: bicubic;

  /* Suppress the space beneath the baseline */
  /* vertical-align: bottom; */

  /* Responsive images */
  max-width: 100%;
  height: auto;
  /* Correct IE 8 not scaling image height when resized. */
  width: auto;
}

When i comment the height: auto; and width: auto; it works :)

drupal27923’s picture

Issue summary: View changes

I had a similar issue with a scrollbar on the x-axis in popups. To fix it I had to amend the line-height property of a parent container to 1.