midzer / tobii

An accessible, open-source lightbox with no dependencies
https://midzer.github.io/tobii/demo/
MIT License
196 stars 20 forks source link

Adding/removing elements #93

Closed reachcalvyn closed 1 year ago

reachcalvyn commented 2 years ago

To reproduce the issue, please do the following in the fiddle: https://jsfiddle.net/s56k8aum/3/

  1. Add First Image
  2. Remove First Image
  3. Add First Image (this causes exception)

Could you please maybe add a method similar to reset or something and call it "refresh"? Basically "refresh" would walk the DOM and refresh based on changes in the DOM.

midzer commented 2 years ago

@reachcalvyn Thanks for reporting this (possible) bug!

@viliusle can you have a look at this one? I have no clue why it doesn't work in the fiddle.

viliusle commented 2 years ago

I will try to look at this later.

reachcalvyn commented 1 year ago

Any update on this issue? I looked at the source code and there are a bunch of TODO statements so it seems the issue may have been already known during development. I am using this in prod and would really appreciate it if this can be fixed.

midzer commented 1 year ago

Thanks alot for your contribution @viliusle.

I just double checked this and it's working fine.