From: Benoît Pin Date: Fri, 10 Oct 2014 08:54:04 +0000 (+0200) Subject: bugfix. X-Git-Url: https://scm.cri.mines-paristech.fr/git/Portfolio.git/commitdiff_plain/56cf98937c95ed6aee58b464aa389ee3a90c9413?ds=sidebyside;hp=--cc bugfix. --- 56cf98937c95ed6aee58b464aa389ee3a90c9413 diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index 97c7f79..3438151 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -482,10 +482,10 @@ Lightbox.prototype.onDragStart = function(evt) { Lightbox.prototype.onDragOver = function(evt) { var target = getTargetedObject(evt); - if (!target) {return;} - while(target.className !== 'slide') { + while(target && target.className !== 'slide') { target = target.parentNode; } + if (!target) {return;} target = target.parentNode; if (target !== this.dragged) { target.classList.add('dragover');