iframe-resizer
iframe-resizer copied to clipboard
FR: Add option for manual offset
Describe the bug We have an iframe with a box shadow. When the iframe resizes the box shadow is clipped as it's not calculated in the container height.
To Reproduce Steps to reproduce the behavior:
- Create an iframe with a box shadow
- Resize the iframe to a new height
- Look at the bottom of the iframe and notice the box shadow is clipped
Expected behavior
If there was an offsetHeight option, we could simply set a value which compensates for the box shadow. The offset would simply be applied to the final calculated height and would be a constant. It wouldn't be necessary for us, but allowing for a callback could also be helpful for someone to calculate the offset at each moment of resize.
Screenshots

Desktop (please complete the following information):
- OS: MacOS
- Browser Brave
- Version 1.34.80
Happy to take a PR for this, can you please add width as well
Fixed in V5.0.0 #1205