hajkmap / Hajk

A modern, full-featured OpenLayers based map viewer and editor
MIT License
119 stars 45 forks source link

Bug: Collapsed InfoClick in iframe #1507

Open jesade-vbg opened 3 months ago

jesade-vbg commented 3 months ago

On some occations the InfoClick window gets collapsed when the application is loaded within an iframe.

The window component does not seem to get loaded properly which causes the Rnd component to get the height "dynamic" which is totally wrong as this is not a valid value.

My quickfix is to force "auto" which is the default behaviour of the Rnd component. Otherwise, when Rnd component gets the height value "dynamic" it is set to "0px" which collapses the InfoClick window.

size={{
    width: width,
    height: height === "dynamic" ? "auto" : height,
}}

I know that this does not solve the underlying issue but as this might be urgent or might get urgent for some of us and the fact that some of the UI probably will get a rebuilt soon, I strongly recommend this quick fix.

I'm currently running the fix live.

Let me know your thoughts.

image

jacobwod commented 3 months ago

I recall seeing it on certain occasions, don't think it was limited to embedded instances only. Anyway, since you've got a fix: bring it on. 😃