Close gallery on outside click
This commit is contained in:
parent
7fca5cf93a
commit
49836e267b
1 changed files with 4 additions and 3 deletions
|
|
@ -18,8 +18,10 @@ app.views.Gallery = app.views.Base.extend({
|
||||||
preventHideControls: function(){
|
preventHideControls: function(){
|
||||||
var lightbox = $("#blueimp-gallery");
|
var lightbox = $("#blueimp-gallery");
|
||||||
var onEvent = function(ev){
|
var onEvent = function(ev){
|
||||||
ev.preventDefault();
|
if($(ev.target).hasClass("slide-content")){
|
||||||
ev.stopPropagation();
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
lightbox.find(".slide").click(onEvent);
|
lightbox.find(".slide").click(onEvent);
|
||||||
|
|
@ -29,7 +31,6 @@ app.views.Gallery = app.views.Base.extend({
|
||||||
return {
|
return {
|
||||||
index: link,
|
index: link,
|
||||||
event: event,
|
event: event,
|
||||||
stretchImages: true,
|
|
||||||
hidePageScrollbars: false,
|
hidePageScrollbars: false,
|
||||||
disableScroll: true,
|
disableScroll: true,
|
||||||
continuous: true,
|
continuous: true,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue