wnr / element-resize-detector

Optimized cross-browser resize listener for elements.
MIT License
1.32k stars 118 forks source link

Display: none should perhaps not be handled as a detached element. #36

Closed wnr closed 8 years ago

wnr commented 8 years ago

If an element is not detached, but has width "auto" (as in the case when display:block) it could be feasible to traverse the DOM chain to fetch the first parent element that has an explicit width. This could get messy with different layout options for elements (inline vs block) etc, but could perhaps be done quite easily.

wnr commented 8 years ago

Unfortunately this requires to know the original display types of elements that are display none, which seems impossible at the moment.