bugfix.
authorBenoît Pin <pin@cri.ensmp.fr>
Fri, 10 Oct 2014 08:54:04 +0000 (10:54 +0200)
committerBenoît Pin <pin@cri.ensmp.fr>
Fri, 10 Oct 2014 08:54:04 +0000 (10:54 +0200)
skins/photo_lightbox_viewer.js

index 97c7f79..3438151 100644 (file)
@@ -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');