developit/simple-element-resize-detector

Resize events only work if iframe in viewport

Open

#10 ouverte le 9 déc. 2017

Voir sur GitHub
 (2 commentaires) (0 réactions) (0 assignés)JavaScript (4 forks)github user discovery
bughelp wanted

Métriques du dépôt

Stars
 (189 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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.

Guide contributeur