Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equal heights: Improve row detection (exclude hidden elements) #9639

Merged

Commits on Jul 27, 2023

  1. Equal heights: Improve row detection (exclude hidden elements)

    The plugin detects new "virtual" rows by comparing the vertical offsets of each element designated to be equalized. New rows are established when back-to-back elements are detected as having different offsets.
    
    wet-boew#9589 fixed a bug that prevented it from working properly on deeply-nested elements using the eqht-trgt class. How? By changing how offsets were detected into a calculation representing the viewport's vertical scroll position + each element's top offset relative to the viewport.
    
    The new calculation logic worked fine for visible elements, but not on hidden (display: none;) ones. Why? Because hidden elements don't have a top viewport offset. So inconsistent offsets were getting used when comparing visible elements against hidden ones.
    
    End result was that if a visible element was followed by a hidden one, the plugin would end the current row and establish a new one... even if a subsequent visible element was still on the old row. That caused mismatched equalization and potentially-broken float layouts.
    
    This fixes it by modifying the row detection logic to exclude hidden elements (i.e. anything with an offsetHeight of 0).
    
    Partially addresses wet-boew#9607.
    EricDunsworth committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    e44a6ae View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. Configuration menu
    Copy the full SHA
    00b0b64 View commit details
    Browse the repository at this point in the history