developit / developit/simple-element-resize-detector

Resize events only work if iframe in viewport

Open
#10 2 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
JavaScript
Stars
189
Forks
4
PR merge metrics
No merged PRs in 30d

Description

The solution of `top:-100%;` and `margin:1px 0 0;` does not keep the iframe positioned in a viewable area at all times. If the target element is nested in an element with `overflow: hidden` and the target element has a negative top margin or a negative absolute positioned top the resize events stop working.

`top: 0; z-index: -1` seems to fix the issue but I'm not sure what all the consequences are.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the resize-event failure with the hidden iframe nested inside an overflow-hidden element and positioned with a negative top offset. Compare that behavior with top: 0 and z-index: -1, checking that resize events continue to fire without introducing positioning or visibility regressions; done means the nested case remains observable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.