Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Fwd: [jQuery] jQuery issues in Firefox 3
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 37 of 37 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Diego Perini  
View profile  
 More options Jun 23 2008, 4:19 pm
From: Diego Perini <diego.per...@gmail.com>
Date: Mon, 23 Jun 2008 13:19:43 -0700 (PDT)
Local: Mon, Jun 23 2008 4:19 pm
Subject: Re: Fwd: [jQuery] jQuery issues in Firefox 3
Ariel,

On 23 Giu, 20:39, "Ariel Flesler" <afles...@gmail.com> wrote:

> > > > .imagesReady()

> > > The only way to achieve this would be to bind an onload event to every
> > > single image on the page (including ones including in stylesheets?) -
> > > this isn't needed. Overwhelmingly "image ready" corresponds to
> > > $(window).load();

> > In Opera this is not necessary for example, you can setup a
> > mini "delegation" of the "load" event on images like this:

> >   document.addEventListener('load', fn, true);

> I don't understand... imagesReady is equal to window.onload, why worrying
> about each image's load event ?

In the same way as for images, in Opera, when a style is loaded
it will trigger a "load" event on the document. So having this
capability can avoid using the much hated setTimeout
and will give the browser more time to render.

Unfortunately this expected (to me) behavior is only offered by Opera
to my knowledge. There were talks about Safari also supporting that
capturing bit on "load" events but I haven't tested it lately.

> > Delegation friends...delegation is the key, this is like CSS does.

> What do you mean ? I don't know much about the CSS engine, in what way does
> it use delegation ?
> While I agree that delegation is THE way, I don't see the application to
> this matter.

> Cheers Diego

CSS is a way of pre-declaring properties values that will be
applied to a set of elements matching the selector declaration.

Delegation is a way of pre-declaring behavior that will be
applied to a set of elements matching the selector declaration.

In both cases it is not mandatory the elements exists at the time
those declarations are parsed. They will be applied in-time as
soon as the elements are loaded or later inserted in the DOM.

If we can ensure the width/height of the element are read inside
a delegated handler we also ensure no events can be generated
on that element until the element is completely rendered.

This avoids accessing non existing elements/properties and the
errors generated in those cases,

--
Diego Perini


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Webster  
View profile  
 More options Jun 23 2008, 5:26 am
From: "David Webster" <cognite.rem...@gmail.com>
Date: Mon, 23 Jun 2008 10:26:53 +0100
Local: Mon, Jun 23 2008 5:26 am
Subject: Re: [jquery-dev] Fwd: [jQuery] jQuery issues in Firefox 3

On Sun, Jun 22, 2008 at 11:16 PM, John Resig <jere...@gmail.com> wrote:
> IMO - I think we should "morph" document ready into being completely
> safe (even if it is, potentially, late) - firing after all stylesheets
> are loaded.

> Additionally we should provide the old "document ready" functionality
> (maybe something like $(document).early(...)) that fires right when
> the DOM is ready. We'll continue to promote the use of document ready
> (it being the safest and easiest way to achieve your desired result)
> while providing information on early for advanced users.

Hi John (and all),

Thanks for the responses. From a users point of view the above
functionality would be great & would tie in with the way the rest of
jQuery "just works" without having to know the intimate details of how
different browsers run javascript.

Let me know if you need more information about how this defect affects
real world applications.

David.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yereth  
View profile  
 More options Jun 24 2008, 3:46 am
From: Yereth <yer...@gmail.com>
Date: Tue, 24 Jun 2008 00:46:06 -0700 (PDT)
Local: Tues, Jun 24 2008 3:46 am
Subject: Re: Fwd: [jQuery] jQuery issues in Firefox 3
To me it makes the most sense if document ready will wait for
stylesheets, as it seems counter-intuitive (especially to new users!)
that many of the jquery functions will not work correctly on document
ready when they should return dimensions and such. I'm not a
marketeer, but I think even from this point of view it will be good
for jquery as a major library to 'just work'. I can imagine there's a
lot of jobs (for more advanced users!) which are useful to execute on
DOM ready, restricting oneselves to operations not requiring CSS to be
loaded, for instance. For that I'd propose (which is done earlier,
IIRC) to add:

$.domReady

We then have "document ready", "dom ready" and "window load". This
seems adequite to me, even in the light of the above discussion. Above
all, this won't break any existing code (quite the opposite) against a
slight performance loss on those browsers which fire dom ready before
CSS is loaded.

Most important is that, whatever decision will be made, document ready
will behave exactly in the same way (from the outside) in all
supported browsers.

What are your thoughts?

Cheers,
Yereth


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diego Perini  
View profile  
 More options Jun 24 2008, 11:13 am
From: Diego Perini <diego.per...@gmail.com>
Date: Tue, 24 Jun 2008 08:13:34 -0700 (PDT)
Local: Tues, Jun 24 2008 11:13 am
Subject: Re: Fwd: [jQuery] jQuery issues in Firefox 3
John,
I noticed that by moving the "LINK" tag before the scripts
will let the example work in both FF3 and Safari 3.1.
I mean in both browser I get correct with / height.

Is this something that can help solve this problem
flickering and FOUC ?

--
Diego Perini

On 23 Giu, 19:19, "John Resig" <jere...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Resig  
View profile  
 More options Jun 24 2008, 12:22 pm
From: "John Resig" <jere...@gmail.com>
Date: Tue, 24 Jun 2008 12:22:20 -0400
Local: Tues, Jun 24 2008 12:22 pm
Subject: Re: [jquery-dev] Re: Fwd: [jQuery] jQuery issues in Firefox 3
Actually, it probably is - that's a good discovery, Diego. Can you
check and see how it works in Opera, as well? If this works then we
can simply specify that the JavaScript be included after the
stylesheets, if you want to access their styles.

--John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diego Perini  
View profile  
 More options Jun 24 2008, 12:37 pm
From: Diego Perini <diego.per...@gmail.com>
Date: Tue, 24 Jun 2008 09:37:50 -0700 (PDT)
Local: Tues, Jun 24 2008 12:37 pm
Subject: Re: Fwd: [jQuery] jQuery issues in Firefox 3
John,
actually I recall Brandon having given that advice somewhere
in previous posts, and I remember I tried then with same results.

I will do more test on Opera but I am on leave in a few days so
here is the modified test if someone else can do it before.

   http://javascript.nwbox.com/JQ-CSS/jquery.html

The other thing to notice is that nearly all browsers except IE
have events for the iframes on the main document, and I
believe there is a reason for their existence:

document.addEventListener('DOMFrameContentLoaded', fn, false); //
maybe true instead of false ??

I will do more tests as I am back, anyway the fact that this
behavior is user tunable may give us a chance of succeeding,
at least with some extra docs explaining this.

--
Diego Perini

On 24 Giu, 18:22, "John Resig" <jere...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steve Clay  
View profile  
 More options Jun 24 2008, 2:09 pm
From: Steve Clay <st...@mrclay.org>
Date: Tue, 24 Jun 2008 14:09:58 -0400
Local: Tues, Jun 24 2008 2:09 pm
Subject: Re: [jquery-dev] Re: Fwd: [jQuery] jQuery issues in Firefox 3

Diego Perini wrote:
> I noticed that by moving the "LINK" tag before the scripts
> will let the example work in both FF3 and Safari 3.1.

With the talk of resource loading, Steve Souders' recent IO talk (and
the cuzillion tool) might be enlightening. It covers several script
loading methods and how css (and inline script) placement affects
loading and synchronicity.

http://youtube.com/watch?v=QRUqVyP27Hw
http://stevesouders.com/docs/googleio-20080529.ppt
http://stevesouders.com/cuzillion/

Basically it makes me think that we shouldn't rely on any particular
markup order to fix anything.

FWIW, I like the cssReady() + "safer" ready() idea.

--
Steve Clay
http://mrclay.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yereth  
View profile  
 More options Jun 25 2008, 4:53 am
From: Yereth <yer...@gmail.com>
Date: Wed, 25 Jun 2008 01:53:21 -0700 (PDT)
Local: Wed, Jun 25 2008 4:53 am
Subject: Re: Fwd: [jQuery] jQuery issues in Firefox 3
Diego,

This is a great find. It seems to fix my problems here in Safari. I
feel like an idiot to never have thought of this before... It still
seems like an unreasonable demand to ask people to change their markup
for things to work properly, but at least I don't need to nasty $
(window).load 'fix' anymore.

Cheers!

On Jun 24, 4:13 pm, Diego Perini <diego.per...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Higgins  
View profile  
 More options Jun 25 2008, 8:23 am
From: Peter Higgins <phigg...@gmail.com>
Date: Wed, 25 Jun 2008 08:23:10 -0400
Local: Wed, Jun 25 2008 8:23 am
Subject: Re: [jquery-dev] Re: Fwd: [jQuery] jQuery issues in Firefox 3
Just noticing this thread, but I can confirm this behavior. Dijit has
made it a recommended "best practice" to put styles above script to
eliminate what we describe as our 'css race condition'. Initially, it
seemed related to embedded @import rules in CSS (themes) ... It seemed
to only effect Safari, but at the time we'd adopted the 'fix' FF3 hadn't
been released. And while it may seem unreasonable to ask people to
change their markup, the problem is real, and browser related, and only
effects a small subset of use cases (I suspect jQuery UI will want to
take note here too, Paul?) where components are dependent on having
calculated styles available. It is a trivial workaround, and probably
not worth the additional timers or polling / etc. Documenting the issue
with an explanation as to why would be sufficient, imho.

Regards,
Peter Higgins


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Resig  
View profile  
 More options Jun 25 2008, 9:42 am
From: "John Resig" <jere...@gmail.com>
Date: Wed, 25 Jun 2008 09:42:56 -0400
Local: Wed, Jun 25 2008 9:42 am
Subject: Re: [jquery-dev] Re: Fwd: [jQuery] jQuery issues in Firefox 3
Thanks for chiming in Peter. I think this will be a good thing to set
forward for people to follow. We generally don't like to dictate the
markup of a document but this is a case it would seem that the
overhead (and the fact that we generally won't be able to manipulate
the document prior to it being displayed).

--John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diego Perini  
View profile  
 More options Jun 25 2008, 12:40 pm
From: Diego Perini <diego.per...@gmail.com>
Date: Wed, 25 Jun 2008 09:40:51 -0700 (PDT)
Local: Wed, Jun 25 2008 12:40 pm
Subject: Re: Fwd: [jQuery] jQuery issues in Firefox 3
John,
I could only test Opera 9.27 currently and I get the same results,
no way to test 9.5 now but believe this has not changed in Opera,
having styles before scripts let's Opera correctly read the
width and height of the elements.

For me it is an expected behavior, the order we use to define
the style is also the order in which the browsers applies them,
and the order in which we should read style properties have
to follow this, we can read style only after having set it.

It wasn't that obvious initially but it is much clearer now.

--
Diego Perini

On 24 Giu, 18:22, "John Resig" <jere...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Krijn Hoetmer  
View profile  
 More options Jun 26 2008, 3:28 am
From: "Krijn Hoetmer" <krijnhoet...@xs4all.nl>
Date: Thu, 26 Jun 2008 09:28:54 +0200
Local: Thurs, Jun 26 2008 3:28 am
Subject: Re: [jquery-dev] Re: Fwd: [jQuery] jQuery issues in Firefox 3

> I could only test Opera 9.27 currently and I get the same results,
> no way to test 9.5 now but believe this has not changed in Opera,
> having styles before scripts let's Opera correctly read the
> width and height of the elements.

Apart from $(window).height() (and .width(), probably). In 9.5 that  
returns the height of the document, not the viewport. That's probably a  
different issue though :)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »