taenzer.me blog

Random stuff from Poppelsdorf 
Filed under

second click

 

Firefox-bug: Close button of Lightbox2-Plugin with Wordpress not working, producing a scrollbar and blue outline instead of closing

We're using Wordpress and NextGenGallery plugin for a client's site, with the possibility to open images with lightbox in full screen size. We're using Stimuli's Lightbox 2-plugin for this. It's working fine in Safari.

But in Firefox and Internet Explorer, somehow all images get a blue outline, and the close-button (which is an image) underneath the opened lightbox-image gets one. Clicking the close button would also produce a scrollbar, and only second click would close the image. I believed this to be a line-height or height problem, and in fact it is. Firefox and IE add this 1px blue outline to links as such and links or images in focus. So putting only the border to 0px won't work.

Scrollbar

Instead, my fix is this:

a, a img, a:focus, a img:focus{
    border: 0px;
    outline: none;
}   

Afterwards, the close button won't show this odd behaviour anymore and clicking the "X" will close the image.

In addition, if you happen to experience the close button not working at all, adding

#stimuli_imageData a#stimuli_bottomNavClose {

    position: relative;   
    z-index: 1000;

}

will do the trick. There is some overlaying issue causing this.

 

 

Filed under  //   blue border   close button   firefox   lightbox   lightbox 2   nextgenGallery   not working   outline   scrollbar   second click   stimuli   wordpress