Lightbox getting open multiple time on enter.

Posted by Salil on Stack Overflow See other posts from Stack Overflow or by Salil
Published on 2010-06-11T11:20:08Z Indexed on 2010/06/11 11:22 UTC
Read the original article Hit count: 162

Hi All,

I am going through a weird problem while using lightbox .

Where ever the new light box is used user is able to open the same light box on same page number of time. For e.g

Using tab button go to `Lightbox link`.
Press enter --> Light box will open.
Press enter --> second light box open below the previous one.
and so on.......

The problem is occurred when I use tab and entered on the link my focus is not getting changed from the link and so user is able to open multiple lightbox on clicking enter.

I try following but it not works for me

<a href = '/calenders/add_shipment' onclick ="this.blur()" class='lbOn'>
   <img src='/images/box-plus.png' style='border:none;'>
</a>

what should be my approached to get out of this.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about ruby-on-rails