Skip to content

Conversation

@mgol
Copy link
Member

@mgol mgol commented Jun 24, 2020

jQuery >=3.2 doesn't include scrollbars in .height(), this commit switches
it to .innerHeight() which does so in jQuery >=3.3. In jQuery 3.2 it doesn't
either so include scrollbars in innerHeight, add it back.

Using .innerHeight() instead of .height() should be fine as menu doesn't
define padding styles.

jQuery >=3.2 doesn't include scrollbars in `.height()`, this commit switches
it to `.innerHeight()` which does so in jQuery >=3.3. In  jQuery 3.2 it doesn't
either so include scrollbars in innerHeight, add it back.

Using `.innerHeight()` instead of `.height()` should be fine as menu doesn't
define padding styles.
@mgol mgol added this to the 1.13 milestone Jun 24, 2020
@mgol mgol requested review from a team, arschmitz and fnagel June 24, 2020 16:34
height = this.element.innerHeight();

// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using < 3.3?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because only 3.2 has this bug. See jquery/jquery#3589.

Copy link
Member

@fnagel fnagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 by reading

@mgol mgol merged commit 1712b9b into jquery:master Jul 23, 2020
@mgol mgol deleted the menu-3.2-scrollbar-fix branch July 23, 2020 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants