John, I appreciate your openness to new browser developments, but I
find your conclusion very difficult to digest.

When basic jQuery methods are used to control visibility of an element
(and this is often outside of my control because jQuery and plugins
e.g. jqModal use them), then jQuery denies itself the option to get
the dimension of an element without flicker.

This is so because jQuery.hide() sets display to "none", basicillay
checkmating itself. So there is this conflict that on one hand you are
asking me not to use display:none which I can do by using visibility:
"hidden", but on the other hand jQuery still uses display:none
internally.

IMHO the outcome is absolutely predictable but some people get
confused with this.

The discussion in http://dev.jquery.com/ticket/5743 has turned into a
farce because not all of the involved parties seem to understand what
a testcase is. They try to neutralize the testcases by providing
workaround ideas. I have plenty of workarounds already, that's not the
problem.

I think that you would agree with me that a GUI toolkit must provide
access to dimensions of elements before showing them, without any
surprises such as flicker.



On Jan 8, 3:16 am, John Resig <jere...@gmail.com> wrote:
> Browsers don't provide height/width information for elements when
> they're display: none (or within a display: none element). There is no
> workaround for it - other than making the element not display: none.
> Sorry :-/
>
> Naturally, if an alternative is ever developed for retrieving the
> height/width of a display: none element that doesn't involve toggling
> its display we'll happily switch to it.
>
> --John
>
> On Wed, Jan 6, 2010 at 6:53 PM, average_user <bht...@gmail.com> wrote:
> > Hi,
>
> > I noticed that in the nightly builds, the function jQuery.swap() is
> > still used internally in the jQuery.css() function to get the
> > dimensions of an element.
>
> > It hurts to see this unbelievable hack, apart from the obvious
> > consequences:http://dev.jquery.com/ticket/5743
>
> > This function is used internally only once, and one CAN get the
> > required attributes without using jQuery.
>
> > I repeat this for clarity: This hack temporarily updates the DOM just
> > to read an attribute.
>
> > I hope that this has just been overlooked somehow.
>
> > If, on the other hand, it is considered safe to do this, than a bugs
> > should be filed against all browsers that cannot cope with it. I would
> > like to know what the strategy is.
>
> > Thanks.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "jQuery Development" group.
> > To post to this group, send email to jquery-...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > jquery-dev+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/jquery-dev?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to