tholman / intense-images

A simple library to view large images up close using simple mouse interaction, and the full screen.
http://tholman.com/intense-images
2.58k stars 278 forks source link

A better way to remove viewer #66

Closed thomasgroch closed 6 years ago

thomasgroch commented 7 years ago

I found that when the user clicks on 2 photos quickly intense-images get kind crazy losing the "open or closed" state. I was able to reproduce the error even in the demo. ss

sa

maybe do a try catch?

tholman commented 7 years ago

Ooh yeah, best to check that its still connected, and remove it. Or even better, remove the event handler on the first click.

Can patch up when I grab a minute!

tiagogon commented 6 years ago

I am having the same issue on my page after clicking few images (not even at the same time). I am getting this error:

intense.min.js?x66689:1 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at Image.B (https://trouble.place/wp-content/themes/trouble/library/js/intense-images/intense.min.js?x66689:1:5555)
B @ intense.min.js?x66689:1

Screencast of the issue: https://youtu.be/u4uIjbH-lBY


Thanks for the great work here! <3 I love intense images to display some of my photographic series :)

tholman commented 6 years ago

Pushed an update, should no longer be able to get into this position. Let me know if there are any other problems, and extra thank you for the screencast of the issue!

tiagogon commented 6 years ago

<3 I will text it intensively and report in case i find other issues :)