Go To Content
codylindley.com

codylindley.com

Thickbox 1.1 - Some Safari Love

Yesterday I made some small changes to the Thickbox code that fixed an issue around the resizing of an image object (javascript of course) in Safari. Basically, the image resize example in the demo now works in Safari. Check out the demo. Preferably using the Safari web browser.

Many thanks to Jonathan from urbanmainframe.com for figuring out the javascript required to make Safari (my fickle foe) happy. I could isolate the issue, but it’s Jonathan who figured out a solution.

Upgrading simply requires replacing the thickbox.js file with the new code found in the demo.

 
  1.   #1 Comment Posted by Jason Levine on Jun 23, 03:53 PM

    I was trying to modify Thickbox for use a redesign of my website, but was running into problems. I then tried the original demo on the JQuery site and realized that it wasn’t working in FireFox. Could this be an issue with my installation of FireFox or is there a more widespread issue? (BTW. my changes were a set of Previous/Next links when the Thickbox was displaying an image. When I’m done with it, I’ll release the code so you can fold it back into Thickbox if you so choose.)

  2.   #2 Author Comment on Jun 23, 03:58 PM

    @Jason – Can you tell me the issue. Thickbox functions fine for me on FF windows version 1.5.0.4.

  3.   #3 Comment Posted by Jason Levine on Jun 23, 04:10 PM

    That’s the version I have too.

    When I go to the JQuery demo site and click an image, the image just loads up as if it were a normal link. The page is completely replaced by the image instead of the image loading in a little box.

    Perhaps there’s an extension or something that I installed that is interfering with Thickbox.

  4.   #4 Author Comment on Jun 23, 04:21 PM

    @Jason – Well, you are not the only one who is spoken about this bug. Thing is I can’t seem to replicate it. Might want to make sure you haven’t turn of JS.

  5.   #5 Comment Posted by Jason Levine on Jun 23, 06:35 PM

    I’m on my wife’s computer now and her FireFox installation works with the demo just fine. Perhaps if I figure out the differences between them, it will help with the debugging.

  6.   #6 Comment Posted by Jason Levine on Jun 25, 10:50 AM

    I think I know what the problem was. The settings for Firefox on my computer weren’t too different from my wife’s computer. But then I noticed that she had almost no extensions installed. So I decided to install the same extensions on her computer as on mine until the problem showed up. After trouble installing Tabbrowser Extensions on her system and some writeups about how buggy TBE is, I decided to remove it from my computer instead. Now my computer works fine.

    So if anyone else reports troules with Thickbox and Firefox, ask them if they have TBE installed. If they do, have them remove it and see if that fixes the problem.

    Now to find a less buggy replacement for TBE and to finish my modifications of Thickbox for my website. (Once I have it working properly, I’ll let you know where it is and the code changes I made just in case you want to fold them into Thickbox.)

  7.   #7 Comment Posted by Jason Levine on Jun 25, 03:21 PM

    Looks like I’ve got it working now. :-)

    Here’s a link:

    http://www.jasons-toolbox.com/wordpress/?page_id=10

    (Note: That’s a development directory, so it won’t be permanently available. Still, it shouldn’t go away before the end of the week.)

    If you like the changes, feel free to fold them into ThickBox.

  8.   #8 Author Comment on Jun 26, 11:06 AM

    The new version of ThickBox slated for release today is going to be delayed so that I can release ThickBox 1.2 with the alpha release of jQuery 1.0. The 1.0 release of jQuery should happen before months end. So, expect to see the new version of ThickBox around this time, if not on the same day that 1.0 is released.

    Here is a sneak peek at some of the changes coming in ThickBox 1.2.

    * Lowercase and uppercase extensions for ThickBox files.

    * Loading animation position fix.

    * Select boxes in IE appear hidden when ThickBox is open.

    * CSS changes.

    * Fixed bug that occurred when no title value is giving.

  9.   #9 Comment Posted by szymek on Jun 28, 04:40 AM

    Hi!

    There’s a bug in all thickbox versions regarding loading animated gifs in IE as onload event for them is triggered when they are downloaded and every time the animation finishes.

    You need to add:
    “imgPreloader.onload = null� (without �;� at the end)
    as the first line of:
    “imgPreloader.onload = function(){}�

    So basically you just reset the onload even, so there’s nothing to be executed when animation finishes.

  10.   #10 Comment Posted by Adi on Jul 13, 12:36 AM

    I’m using Firefox 1.5.0.4 on a Mac and the demo doesn’t work. The screen darkens & I see the loading wheel spinning – which is where it sits forever. Extensions installed: DOM Inspector 1.8.0.4, Talkback 1.5.0.4, Nandu 0.6 & Total Validator 2.2.

    Works OK on Safari.

  11.   #11 Author Comment on Jul 13, 09:28 AM

    @Adi – Do you have any other systems to test FF 1.5.0.3 and ThickBox?

  12.   #12 Comment Posted by Fil on Jul 22, 08:08 AM

    I notice the same on Firefox (on a Mac): sometimes the script just doesn’t seem to receive the image, and spins forever; sometimes it works.

  13.   #13 Comment Posted by Justin Bergson on Jul 21, 05:24 PM

    I’m having a problem in Safari for the Mac. If you click on the first image (www.somethingweb.com/portfolio.html) you’ll know what i mean. It starts loading correctly but then sends me over to the link. Works fine in every other browser. Any ideas whats going on?

  14.   #14 Comment Posted by darshan on Aug 30, 05:04 AM

    hello