cbeyls/slimbox

object's not showing back.

Closed this issue · 3 comments

What steps will reproduce the problem?
1. put a slimbox on a page containing an object (like Flash video)
2. launch the slimbox
3. close it

What is the expected output? What do you see instead?

The video has been hidden during the slideshow but showed back at the end.


What version of the product are you using? On what operating system?

jQuery 1.4.1, slimbox 2.02.


Please provide any additional information below.

I changed $.data("slimbox") with $.attr("data-slimbox") and it works that 
way. "data-" is an HTML5 feature though.

A ticket has been opened at jQuery's bugtracker 
too: http://dev.jquery.com/ticket/6073


BTW, I tested with Firefox 3.5.6 on Linux.

Original issue reported on code.google.com by yoan.blanc on 11 Feb 2010 at 2:19

The jquery docs state "Due to the way browsers interact with plugins and 
external
code, the .data() method cannot be used on <object>, <applet> or <embed> 
elements."
per http://api.jquery.com/data/

So, this line in slimbox2.js:

 $.data(el, "slimbox", el.style.visibility)

where el will be an object, doesn't appear to be valid...

As a temporary fix, I changed to:

el.style.visibility = open ? "hidden" : 'visible'; //$.data(el, "slimbox");

so visibility is always restored.

Hope this helps ...

Chris .\\

Original comment by chris.ma...@gmail.com on 17 Apr 2010 at 6:40

Issue caused by changes in jQuery 1.4 which prevents attaching data to nodes of 
type 
"object" and "embed".
Fix commited, will be part of next release (2.04)

Original comment by christophe.beyls@gmail.com on 20 Apr 2010 at 2:13

  • Changed state: Fixed
Hey Chris,

   Can u tell me where to placed this code:
 el.style.visibility = open ? "hidden" : 'visible'; //$.data(el, "slimbox");

because i am suffering from same problem.

Original comment by pradeep0...@gmail.com on 8 Jul 2010 at 12:14