Hi,

I'm using Lightbox2 to display videos, and I put HTML-code in the caption. But when you click on the caption it closes down the lightbox. I've put an input box with code to embed the video within this caption, and when you try to select the piece of code, the lightbox shut down.

Example:

Embed this video: ]" title="the title">a link

CommentFileSizeAuthor
#2 lightbox2_5x_285518.patch917 bytesstella

Comments

Eiersneijer’s picture

<a href="link to video" rel="lightvideo[width:550px; height:412px;][<strong>Embed this video: </strong><input type='text' value='code to embed the video'>]" title="a title">a link</a>

sorry, this is the example.

stella’s picture

Status: Active » Fixed
StatusFileSize
new917 bytes

Please try the attached patch, or the latest dev release (available later today).

Cheers,
Stella

Eiersneijer’s picture

Status: Fixed » Needs work

This solves the problem when you click on it. However, to copy, using ctrl+c, it closes the lightbox ('cause C is a hotkey).

stella’s picture

Status: Needs work » Fixed

Ok, in the latest dev release I've made the keyboard shortcuts configurable under the Advanced Settings collapsed fieldset on admin/settings/lightbox2. So you can remove "c" from the list of "closing" shortcuts.

However, I've had to roll back the previous patch for the clicking issue in the input box. It was stopping all links from working, as raised in #290933: 'View image details' link is not working. I can't make both work so I've opted to allow links to work as more people will require that than input boxes. If you want to you can add the one line supplied in the previous patch to lightbox.js and just keep adding it back in each time you upgrade. It will allow you to click in the input box but links will not work. I haven't found an alternative solution, sorry.

Cheers,
Stella

Eiersneijer’s picture

Stupid question, no doubt; but what line should be placed back? I've walked through both lightbox.js (old and new) but don't seem to find the line. I'm not much of a codewiz.

stella’s picture

In the patch above, there's a line beginning with a + sign. This is the line you need to add in (omitting the + sign). The other lines in the patch are just to show you where it's meant to go.

Cheers,
Stella

Eiersneijer’s picture

Thank you.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

stella’s picture

Released in Lightbox2 6.x-1.9 and 5.x-2.9.

Cheers,
Stella