X-Git-Url: https://svn.cri.ensmp.fr/git/Portfolio.git/blobdiff_plain/20d32cad15428a0a8d893a8e248d925b004df2c8..56cf98937c95ed6aee58b464aa389ee3a90c9413:/skins/photo_lightbox_viewer.js 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');