cbeyls/slimbox

Upgrading from jQuery 1.4 to jQuery 1.9 breaks slimbox

Closed this issue · 16 comments

What steps will reproduce the problem?
1. Use slimbox successfully with jQuery 1.4
2. Upgrade to jQuery 1.9
3. Try to use slimbox -- it's broken

What is the expected output? What do you see instead?
When I activate slimbox, I expect the window to be darkened with a normally 
lighted picture showing next and prev tabs and a close button at the bottom.  
Instead I see the picture and window darkened, no navigation or close links.  
Clicking amywhere on the window removes the picture and lightens the window.

What version of the product are you using? On what operating system?
slimbox 2.04 on Internet Explorer 9

Please provide any additional information below.
I have attached a fixed version of the file with the changed section marked on 
lines 40 - 60.

Original issue reported on code.google.com by barry.yo...@gmail.com on 18 Jan 2013 at 9:02

Attachments:

I have the same issue. Entire screen darkens (including image), no navigation. 
I tried the fix, but it does not work entirely. It shows the image, but without 
the darkened layer, and still no navigation. Clicking on the thumbnail shows 
just the larger image. I've tested it in 4 different browsers (Firefox, Safari, 
Chrome & Opera). I'm on a Mac OSX 10.8

I've set my jQuery script to :
<script type="text/javascript" 
src="http://code.jquery.com/jquery-latest.js"></script>

Thanks for any help.

Original comment by colinmcn...@gmail.com on 19 Jan 2013 at 10:48

Barry, excellent patch. It saved me so much effort.

One small addition I found was needed: On line 57, the variable 'overlay' has 
to be wrapped in a jQuery function so that the .click() handler will work 
properly, since 'overlay' was created as a DOM element. So it would read: 
$(overlay).click(close);

Other than that, it's perfect. Thank you!

Original comment by arvel...@gmail.com on 21 Jan 2013 at 2:19

Arvelo, you are quite right.  I have updated the code and attached both verbose 
and minified versions.  This version was tested with both Internet Explorer and 
Safari.  Thank you for your excellent suggestion.  Colin, does this work for 
you?

Original comment by barry.yo...@gmail.com on 22 Jan 2013 at 10:45

Attachments:

This is not working for me and I don't know why!

Original comment by cheky...@gmail.com on 12 Feb 2013 at 9:22

Thanks for your help, barry.

Original comment by christia...@gmail.com on 14 Feb 2013 at 1:17

This upgrade don't work properly :(

Original comment by jwal...@gmail.com on 15 Feb 2013 at 1:26

This fix also works for jQuery 1.9.1, thank you!

For people having trouble with this fix: have you included autoload.js?

Original comment by sonat...@googlemail.com on 18 Feb 2013 at 2:44

Yeah, it's included when using the production code and it's not working :(

Original comment by cheky...@gmail.com on 18 Feb 2013 at 4:50

Attachments:

Checky, You are missing $(window).load(function () { in the first line in  
slimbox.js...

Original comment by ivbrit...@gmail.com on 20 Feb 2013 at 3:48

Thanks for your help Ivan!

Original comment by cheky...@gmail.com on 21 Feb 2013 at 5:31

Thank you man

Original comment by life3...@gmail.com on 25 Feb 2013 at 5:13

Just downloaded slimbox2 today from http://www.digitalia.be/software/slimbox2#
Did not understand why it wasn't working so thanks for this patch. Is there 
anything I can do about box not being vertically centred in firefox?

Original comment by JonBiels...@gmail.com on 19 Mar 2013 at 3:51

Thank you very much for this fix, Barry.
@Jon B. You probably have a stylesheet error on your side. It happened to me 
when I set position to relative on the body element. A link to show your 
example page could help us identifying the false behavior.

Original comment by kenverha...@gmail.com on 22 Apr 2013 at 8:54

Thanks! It's working again! :)

Original comment by afzal.cs...@gmail.com on 18 Aug 2013 at 2:37

Thanks a bunch this solved my headache...Cheers Barry

Original comment by whybrow....@gmail.com on 25 Mar 2014 at 7:33

Version 2.05 includes fixes for jQuery 1.9+.
This happens when jQuery breaks backward-compatibility.