outerHeight()/outerWidth() fix for jQuery 1.8+ #890

Closed
wants to merge 1 commit into from

4 participants

@c17r

When using jQuery 1.8+ with some older components (e.g. jQueryUI), outerHeight() and outerWidth() get "duck punched" and they return an object instead of the expected numeric value. Passing false (which is the default value) fixes the problem.

Christian Sauer outerHeight()/outerWidth() fix for jQuery 1.8+
When using jQuery 1.8+ with some older components (e.g. jQueryUI), outerHeight() and outerWidth() get "duck punched" and they return an object instead of the expected numeric value.  Passing false (which is the default value) fixes the problem.
3f00d5f
@alexei

They return an object because the parameter for outerHeight() should be a boolean value, not an object.
It should be input.outerHeight(true) instead of input.outerHeight({margins: true}) at line 474 in dateinput.js
See http://api.jquery.com/outerHeight/
Also #884

@c17r

The issue is different than #884.

An object is not being passed in ... the non-patched code is calling just "outerHeight()" and expecting an integer. But when doing so with jQuery 1.8+ and an older jQueryUI, outerHeight() does not return an integer, instead it returns an object. The patch is to call outerHeight() explicitly with a boolean so it does return an integer.

@alibby251

Hi sauerc,

I'm a little confused - are you talking about using Tools' Tooltip with other libraries such as jQuery UI? I noticed the comments from @alexei - these relate to DateInput though, not Tooltip? It might help to see this in a JSFiddle if possible please, so we can validate what is happening, and if your patch fixes it?

@mrdoinel mrdoinel referenced this pull request in jamesflorentino/nanoScrollerJS Jul 5, 2013
Closed

NanoScroller dont refresh after ajax #159

@thet

this can be closed. API usage of outerWidth and outerHeight is (mostly) fixed in the dev branch. the default function parameter also defaults to false

@c17r c17r closed this Mar 12, 2015
@c17r c17r deleted the c17r:dev branch Mar 12, 2015
@thet

@c17r @alibby251 you might have to use #1076 instand...

@c17r

LOL. Just cleaning up old but opened items off my dashboard. I opened this 2 jobs ago

@thet

Yo, jqt is quite dead, wouldn't use it for new projects.
We at Plone are replacing jQueryTools with other libraries. But for older releases which are still maintained we created the branch referred in #1076 in order to get jQuery 1.9+ compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment