John -

Thanks for your reply and clarification on the purpose and usage of
feature detection. To your question about maxHeight, the answer is
probably "no".

With $.browser being deprecated and its usage generally frowned upon,
I was looking for a "better" way to deal with browser differences for
plugin development.

Specifically, I have a modal dialog plugin which needs to "detect" IE6
and IE7 in quirks mode. IE6 detection is needed for deciding whether
or not to add an iframe behind the overlay to prevent element bleed-
through. And IE7 in quirks mode detection is needed to determine
correct element positioning.

Perhaps there is no getting around browser sniffing in certain
situations. I'd be happy to hear if there are other recommended
approaches. In the meantime, I'll take a look around to see what other
plugin developers are doing, including the jQuery UI Dialog.

Thanks,
Eric

On Jan 23, 10:18 am, John Resig <jere...@gmail.com> wrote:
> Eric -
>
> That's an interesting feature - might be something to look in to. I'm
> a little hesitant to add new features to $.support that we don't use
> directly in jQuery core (otherwise there'd be every bug under the sun
> in the support list).
>
> On another note: You mentioned that this would be a good way to detect
> for IE 6. That is counter to everything that feature detection is
> designed for. Feature detection is supposed to be used on a
> case-by-case basis. If you need max-height then you use the
> $.support.maxHeight property to use it or provide a workaround. Using
> it to simply detect if IE 6 is being used is a huge assumption and is
> likely to cause things to break.
>
> Is knowledge of having a working max-height a common need for jQuery
> applications or plugins?
>
> --John
>
> On Thu, Jan 22, 2009 at 2:14 PM, Eric Martin <emarti...@gmail.com> wrote:
>
> > In order to transition away from $.browser to $.support, people are
> > going to want/need something to help identify IE6.
>
> > After a bit of research, I found one property that seems to work:
> > elem.style.maxHeight. IE6 returns undefined.
>
> > I'm adding a patch to support.js - please let me know if you think
> > this would work. I tested in IE6 & 7, Firefox 2 & 3, Opera 9.5 & 9.6
> > and Safari 3.
>
> > Usage:
> > if (!$.support.maxHeight) {
> >        // do ie6 stuff
> > }
>
> >http://dev.jquery.com/ticket/3960
>
> > Thoughts?
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@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