The patch is checking for options that have values set to "none". Can
someone explain why that should be supported?
There are already tickets filed for bugs with NaN, so you can search
trac for these tickets and follow them to see any progress. If the
original submitter wants to create a patch and attach it to one of the
tickets it would be much easier to look at than the posted diff.
On Sep 17, 11:10 am, sbisker <[EMAIL PROTECTED]> wrote:
> Did these bug-fixes go anywhere? I'm no browser-compatibility expert,
> but on the surface they look reasonable.
>
> I think I'm running into IE NaN errors thrown by the slider bugs he
> tries to address in his patch, and I see no related open tickets or
> recent commits. I'd be willing to try to test them against my project
> and help push this through if folks are interested? (Not sure how the
> process works around here; just started using jQuery recently.)
>
> -Sol
>
> On Aug 5, 4:05 am, Catch22 <[EMAIL PROTECTED]> wrote:
>
> > What do people think of these patches to fix exceptions being thrown
> > in IE6 and 7 when
> > using dialogs and sliders and one of the attributes ends up beingNaN?
>
> > Another issue addressed is displaying ui.dialog with width and height
> > set to 'none' (IE6 and IE7)
> > and the margin set to 'auto' (IE7), and also making sure the layout is
> > correctly rendered in IE6 & 7.
>
> > I think it would be nice to have these or similar patches in the newer
> > versions of jquery.ui.
>
> > Thanks,
> > /Chandan Kudige
>
> > diff -ruBb jpoker-reference/jquery/ui/ui.dialog.js jpoker-ckfix/
> > jquery/
> > ui/ui.dialog.js
> > --- jpoker-reference/jquery/ui/ui.dialog.js 2008-07-28
> > 17:42:00.000000000 +1000
> > +++ jpoker-ckfix/jquery/ui/ui.dialog.js 2008-07-29 17:37:30.000000000
> > +1000
> > @@ -29,6 +29,20 @@
>
> > $.widget("ui.dialog", {
> > init: function() {
> > + if ($.browser.msie) {
> > + /*IECompatibility bug:
> > + *IEdoes not accept width or height to be set as
> > 'none',
> > + * This code fixes the behaviour to be as if the width
> > or height
> > was not set.
> > + */
> > + if (this.options.width == 'none') {
> > + this.options.width = undefined;
> > + }
> > +
> > + if (this.options.height == 'none') {
> > + this.options.height = undefined;
> > + }
> > + }
> > +
> > var self = this,
> > options = this.options,
> > resizeHandles = typeof options.resizable ==
> > 'string'
> > @@ -40,9 +54,17 @@
> > .wrap('<div/>')
> > .wrap('<div/>'),
>
> > + /*IECompatibility bug:
> > + * When the uiDialogContainer is set to a width/height of
> > 100%
> > + * and the widget width is 'none',IEdoes not render the
> > widget
> > correctly.
> > + * To fix this, ability to override containerWidth/Height
> > is
> > required.
> > + * Pass these in the options.
> > + */
> > uiDialogContainer = (this.uiDialogContainer =
> > uiDialogContent.parent()
> > .addClass('ui-dialog-container')
> > - .css({position: 'relative', width:
> > '100%', height: '100%'})),
> > + .css({position: 'relative',
> > + width: options.containerWidth,
> > + height:
> > options.containerHeight})),
>
> > title = options.title ||
> > uiDialogContent.attr('title') || '',
> > uiDialogTitlebar = (this.uiDialogTitlebar =
> > @@ -237,6 +259,16 @@
> > content = this.element,
> > tbMargin = parseInt(content.css('margin-top'))
> > +
> > parseInt(content.css('margin-bottom')),
> > lrMargin = parseInt(content.css('margin-
> > left')) +
> > parseInt(content.css('margin-right'));
> > +
> > + /*IECompatibility Bug
> > + * When margin is set to auto, the lbMargin and
> > lrMargin values areNaNand
> > + * causes exception onIE.
> > + */
> > + if (isNaN(tbMargin))
> > + tbMargin = 0;
> > + if (isNaN(lrMargin))
> > + lrMargin = 0;
> > +
> > content.height(container.height() -
> > titlebar.outerHeight() -
> > tbMargin);
> > content.width(container.width() - lrMargin);
> > },
> > @@ -340,7 +372,13 @@
> > resizable: true,
> > stack: true,
> > width: 300,
> > - zIndex: 1000
> > + zIndex: 1000,
> > +/*
> > + *IECompatibility (by CK)
> > + * Please refer to function ui.dialog.init
> > + */
> > + containerWidth: '100%',
> > + containerHeight: '100%'
> > },
>
> > overlay: function(dialog) {
> > diff -ruBb jpoker-reference/jquery/ui/ui.slider.js jpoker-ckfix/
> > jquery/
> > ui/ui.slider.js
> > --- jpoker-reference/jquery/ui/ui.slider.js 2008-07-28
> > 17:42:00.000000000 +1000
> > +++ jpoker-ckfix/jquery/ui/ui.slider.js 2008-07-29 15:37:06.000000000
> > +1000
> > @@ -379,7 +379,12 @@
> > if(x !== undefined && x.constructor != Number) {
> > var me = /^\-\=/.test(x), pe = /^\+
> > \=/.test(x);
> > if(me || pe) {
> > - x = this.value(null, "x") +
> > parseInt(x.replace(me ? '=' : '+=',
> > ''), 10);
> > + /* Fix forslidererrors onIE:
> > + * A lot of math in ui.slideris not
> > tested for division by
> > zero and such
> > + * These conditions returnNaNvalues
> > which are safely ignored
> > on
> > + * Firefox/Safari but causes exceptions onIE.
> > + */
> > + x = isNaN(this.value(null, "x"))?
> > 0:this.value(null, "x") +
> > parseInt(x.replace(me ? '=' : '+=', ''), 10);
> > } else {
> > x = isNaN(parseInt(x, 10)) ?
> > undefined : parseInt(x, 10);
> > }
> > @@ -388,7 +393,7 @@
> > if(y !== undefined && y.constructor != Number) {
> > var me = /^\-\=/.test(y), pe = /^\+
> > \=/.test(y);
> > if(me || pe) {
> > - y = this.value(null, "y") +
> > parseInt(y.replace(me ? '=' : '+=',
> > ''), 10);
> > + y = isNaN(this.value(null, "y"))?
> > 0:this.value(null, "y") +
> > parseInt(y.replace(me ? '=' : '+=', ''), 10);
> > } else {
> > y = isNaN(parseInt(y, 10)) ?
> > undefined : parseInt(y, 10);
> > }
> > @@ -399,6 +404,12 @@
> > x = this.translateValue(x, "x");
> > x = this.translateLimits(x, "x");
> > x = this.translateRange(x, "x");
> > + /* Fix forslidererrors onIE:
> > + * A lot of math in ui.slideris not tested
> > for division by zero
> > and such
> > + * These conditions returnNaNvalues which
> > are safely ignored on
> > + * Firefox/Safari but causes exceptions onIE.
> > + */
> > + if (!isNaN(x))
> > this.currentHandle.css({ left: x });
> > }
>
> > @@ -407,6 +418,7 @@
> > y = this.translateValue(y, "y");
> > y = this.translateLimits(y, "y");
> > y = this.translateRange(y, "y");
> > + if (!isNaN(y))
> > this.currentHandle.css({ top: y });
> > }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---