Kris-B / nanoGALLERY

image gallery simplified - jQuery plugin. Touch enabled, responsive, justified/cascading/grid layout and it supports pulling in Flickr, Google Photos and self hosted images.
https://nanogallery2.nanostudio.org/
439 stars 101 forks source link

thumbnailLabel allows HTML elements but interferes with clicks on them #66

Closed mudnug closed 9 years ago

mudnug commented 9 years ago

In my implementation, I am wanting to use the thumbnail description as a template that displays several elements. One is the appropriate icon and link to the built-in Open Album/View Photo functionality. In addition to this, I would like to have other clickable elements (such as a button, or link). The Image Toolbar has some built in provisions for this, and even the thumbnail label/description seems to allow HTML elements.

However, when these elements are clicked, the built-in photo viewer starts loading (even while the link is redirecting the user or taking another action). Is it possible to make templating the thumbnail description area easier or possible to prevent the default behavior on embedded links and buttons?

There is an example of this behavior in the "online test tool" at http://nanogallery.brisbois.fr/#examples

mudnug commented 9 years ago

Added http://jsfiddle.net/82rk3soe/

Kris-B commented 9 years ago

Fixed in v5.4.0

If you still have problems, specify class 'customEventHandler' on your elements.