On Jan 23, 12:48 pm, John Resig <jere...@gmail.com> wrote: > > 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. > This first one is real tricky. I'm not sure what a good solution might > be. Anyone have any thoughts?
This is one of the few cases where javascript experts agree that there is no possible feature detection that can address the problem. The generally agreed upon solution is to use conditional comments (as mentioned by others in this thread). In its simplest form: var useIframe=false; /*...@cc_on useIframe=true; @*/ I prefer to use this, as I've done in my context menu plugin: useIframe:/*...@cc_on @*//*...@if (@_win32) true, @else @*/false,/*...@end @*/ Since the problem only exists on windows, this will save other platforms from the unnecessary inclusion of the iframe. No one should be using browser sniffing or inferring this problem from things like maxHeight! This problem and solution has been around for many years and developers should be familiar with it by now. Matt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---