Side navigation
#3551 closed bug (fixed)
Opened October 29, 2008 08:37PM UTC
Closed April 22, 2009 03:11AM UTC
Dimensions functions fail exceptionally on parent-frame scope
Reported by: | nphase | Owned by: | brandon |
---|---|---|---|
Priority: | minor | Milestone: | 1.4 |
Component: | dimensions | Version: | 1.2.6 |
Keywords: | Cc: | nphase, flesler | |
Blocked by: | Blocking: |
Description
Forgive me for adding to your pile of work. I'd suggest my own fix but I'm not quite skilled enough with the codebase to do such.
The Dimensions set of functions do not properly handle the parent scope (frames).
parent.$("#__overlay,#__alert").hide().fadeIn("slow");
^ all of that will run perfectly, yet something like
parent.$(window).height()
will fail and throw an exeception "NS_ERROR_XPC_BAD_CONVERT_JS" in FF.
parent.window.innerHeight is verified to work properly.
If you need any help testing or replication, feel free to ask
Attachments (0)
Change History (4)
Changed October 29, 2008 09:11PM UTC by comment:1
Changed October 29, 2008 09:13PM UTC by comment:2
Surprisingly, I got this to work when I tried:
window.parent.$().height(); window.parent.$(document).height() does not work (seems like it should) window.parent.$(window).height() does not work (seems like it shouldn't).
Hopefully this will help someone!
(formatting)
Changed October 29, 2008 11:22PM UTC by comment:3
cc: | nphase → nphase, flesler |
---|
I think this is quite expected, here why (I think):
parent.$(window) is calling the jQuery function of the parent window, but passing the window from the frame.
That means... The jQuery object from another window, touching a foreign window.
Maybe this could be indeed patched. That would require to never assume that window is the only window. So replace every foo == window for !!foo.setInterval or something like that.
Still, could fail in many cases. This is not a very common use and I'm not sure it's worthy to patch such a thing.
I will keep this open, assigned to Brandon.
Changed April 22, 2009 03:11AM UTC by comment:4
milestone: | → 1.3.3 |
---|---|
resolution: | → fixed |
status: | new → closed |
This is fixed in latest SVN. Please test it out and let me know if it doesn't work for you.
Surprisingly, I got this to work when I tried:
window.parent.$().height();
window.parent.$(document).height() does not work (seems like it should)
window.parent.$(window).height() does not work (seems like it shouldn't).
Hopefully this will help someone!