developit/simple-element-resize-detector

Resize events only work if iframe in viewport

Open

#10 建立於 2017年12月9日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)JavaScript (4 fork)github user discovery
bughelp wanted

倉庫指標

Star
 (189 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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.

貢獻者指南