You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Overlay plugin backgound image bug w/ Safari & jQuery < 1.3 Created Apr 4, 2009

This thread is solved

Views: 3689     Replies: 4     Last reply Aug 25, 2009  
You must login first before you can use this feature

jpooton

Posts: 7

Registered:
Dec 30, 2008

Overlay plugin backgound image bug w/ Safari & jQuery < 1.3

Posted: Apr 4, 2009

While this isn't really a Flowplayer bug, it does affect it and I just killed 3 hours figuring it out so I figured I would post. :)

The problem comes in that Safari doesn't handle jQuery hide() on elements that aren't in the DOM yet. (At least before it was fixed in 1.3 a couple months agohttp://dev.jquery.com/changeset/5980 )

so the following code in the overlay module doesn't work for Safari with jQ 1.2.x:


img.css({border:0,position:'absolute'}).width(oWidth).hide(); 

however, this workaround would:


img.css({border:0,position:'absolute',display:'none'}).width(oWidth); 

So, I know the answer is "just upgrade your jQuery to 1.3.x". Well I wish it were that easy :) I do Drupal development and Drupal core (let alone the contrib modules) isn't 100% ready for 1.3 so that's not an option.

I'm sure there are others running jQ 1.2.x for various reasons, so maybe it would be possible to include this workaround in the overlay module at least until 1.3 is widespread. Just a thought. :)

jjames

Posts: 2

Registered:
May 2, 2009

» Overlay plugin backgound image bug w/ Safari & jQuery < 1.3

Posted: May 6, 2009

Reply to: Overlay plugin backgound image bug w/ Safari & jQuery < 1.3, from jpooton
Awesome, works, Thanks. This post saved me a lot of pain.

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» Overlay plugin backgound image bug w/ Safari & jQuery < 1.3

Posted: May 14, 2009

Reply to: Overlay plugin backgound image bug w/ Safari & jQuery < 1.3, from jpooton
Thanks! This fix has now been added to upcoming release of overlay.

aamanatullah

Posts: 1

Registered:
Jun 11, 2009

I am still getting problems

Posted: Jun 11, 2009

Reply to: » Overlay plugin backgound image bug w/ Safari & jQuery < 1.3, from tipiirai
First time when image is clicked and overlay and Expose opens when I click on area outside the Overlay it closes the Expose screen but overlay stays open.

Tried Jquery 1.3 and new version of Tools. Only workaround I see is separate divs for each overlay item which is working fine.

edgardo

Posts: 5

Registered:
Aug 25, 2009

» I am still getting problems

Posted: Aug 25, 2009

Reply to: I am still getting problems, from aamanatullah
aamanatullah, I don't know if this would fix would your problem but take a look:

- download the non minimized version of overlay:
http://flowplayer.org/js/tools/tools.overlay-1.0.4.js?download=true
- open it
- goto around line 220 and you'll see something like

img.animate({top: top, left: left, width:0 }, opts.closeSpeed, function()  { 
                        $(self).trigger("onClose", p); 

-right below that line put this:

img.hide(); 

-save it & don't forget to include the new file in your .html:

<script type='text/javascript' src='[your js source]/tools.overlay-1.0.4.js'></script> 

regards, edgardo.