Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In jQuery 3.0 the behavior of .outerHeight()
has changed to return NaN
when an element is not found.
Proposed resolution
If an element is not returned from the selector, use a 0
value.
Comment | File | Size | Author |
---|---|---|---|
toolbar.patch | 1.75 KB | droplet | |
Comments
Comment #2
GrandmaGlassesRopeMan@droplet 👍 This is the same conclusion I just realized.
When closing the toolbar,
$('.is-active.toolbar-tray-horizontal')
returns nothing, thus.outerHeight()
returnsNaN
breaking the height set.Comment #3
GrandmaGlassesRopeManComment #4
GrandmaGlassesRopeManComment #5
GrandmaGlassesRopeMan🚀
Comment #6
Wim Leerslgtm!
Comment #7
martin107 CreditAttribution: martin107 as a volunteer commentedlooking at the bottom set of changes..
toolbarTabOuterHeight and toolbarTrayHorizontalOuterHeight are set, not modified and then read.
so like the top set of changes should be defined as const not var.
Comment #8
GrandmaGlassesRopeMan@martin107
The bottom set of changes, from
ToolbarVisualView.js
, contain the transpiled JavaScript.Comment #9
martin107 CreditAttribution: martin107 as a volunteer commentedAh crap, you are right my mistake... sorry for the noise.
Comment #10
webchickCommitted and pushed to 8.4.x. Thanks!