Comments (4)
@khanhvu161188 in my case this worked
window.lgData[document.getElementById('lightgallery').getAttribute('lg-uid')].destroy(true);
passing true
to destroy
method.
from lg-thumbnail.js.
The issue has been fixed. Please use the latest version of lightgallery.js and lg-thumbnail.js
from lg-thumbnail.js.
What if i have this issue with the latest versions?
My code where it occurs:
let lg = document.getElementById("lightGallery");
lg.addEventListener('onSlideClick', function () {
window.lgData[lg.getAttribute('lg-uid')].destroy();
}, false);
lg.addEventListener('onCloseAfter', function () {
if (lg.getAttribute('lg-uid'))
window.lgData[lg.getAttribute('lg-uid')].destroy(true);
}, false);
window.lightGallery(lg, {
index: imageIndex,
hideBarsDelay: 20000,
preload: 3,
speed: 0,
//enableDrag: false,
dynamic: true,
dynamicEl: this.imgs(),
thumbnail:true,
});
And getting the following error:
Uncaught TypeError: Cannot read property 'removeChild' of null
at Thumbnail.destroy (lg-thumbnail.js?5fcc:478)
at Plugin.destroy (lightgallery.js?4689:1364)
at HTMLDivElement.eval (ModelCard.vue?f04d:135)
at Object.trigger (lg-utils.js?c7c8:96)
at eval (lightgallery.js?4689:1238)
from lg-thumbnail.js.
I confirm this issue is still occurring with latest version (1.2.0).
Here's the affected browsers I got:
- Chrome Mobile 86.0.4240 / 88.0.4324
- Chrome 87.0.4280 / 88.0.4324
- Edge 88.0.705
- Opera Mobile 61.2.3076
- Samsung Internet 13.2
from lg-thumbnail.js.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lg-thumbnail.js.