iframe-resizer icon indicating copy to clipboard operation
iframe-resizer copied to clipboard

Fractional parts are missed during the parsing message data

Open Blacknikomo opened this issue 3 years ago • 3 comments

Describe the bug In our environment, we use iframeResizer to embed snippets in the UI. Sometimes the height calculated with "taggedElement" is a fractional number, e.g. 89.5px.

Whenever the host instance receives the message, it parses the value using the parseInt, so the 89.5px transforms to 89px. In case the content has a border, the bottom part is hidden.

Expected behavior Host uses parseFloat

Screenshots image

Additional context Add any other context about the problem here.

Blacknikomo avatar Nov 26 '21 11:11 Blacknikomo

Happy to take a PR for this

davidjbradshaw avatar Nov 26 '21 19:11 davidjbradshaw

Hi @davidjbradshaw. Thanks for the quick reply. I try to push a commit to a separate branch but receive rejection due to the lack of access rights. Would you prefer to have an IDEA-based patch?

Blacknikomo avatar Dec 01 '21 10:12 Blacknikomo

Just a normal PR should be fine and sorry for late reply, I have been somewhat unwell of late

davidjbradshaw avatar Jan 14 '22 18:01 davidjbradshaw

Fixed in v5.0..0 #1205

davidjbradshaw avatar Feb 11 '24 14:02 davidjbradshaw