-
-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browser freeze with esm modules, carousel type, and empty images #337
Comments
Same for me, I tried to update the type to |
same for me, not found solution except check the item count before call the library |
Two hours of debugging and found this issue., seems to exist in the latest version |
I am facing the same issue as well. |
I'm seeing this with current CDN version in Chrome 76 on macos too. (Apologies for the "me too" style comment, but given the time delay thought it worth adding!) |
Hey, we fixed this for our use in a branch. It's far from perfect, but we potentially throw exceptions at It's a bit noisy at call site, though, so we won't propose it for state.instance = new Glide(id, {
type: 'carousel',
debug: true,
});
try {
state.instance.mount();
// bind events, etc.
} catch (e) {
// handle it however you'd like
} The branch also introduces a log() method that logs its argument if the |
I'm affected by this bug too on FF latest and chrome latest. |
I have the same issue. I have noticed, for some reason, it doesn't happen on the first page visit (e.g. when all cache is cleared). However, when you revisit the page and scroll down to where the slider is, and it beings to mount, the whole site will hang. |
I believe this could happen if you call "destroy" and then re-mount it again too quickly. It happened when we would call destroy, then remount after 100ms. I extended this to 500ms and the error does not occur. |
This also happened to us. We now poll the DOM to check it is in an initial
state after destroying / before mounting. Too many assumptions on what
already exists / does not exist otherwise.
We wrapped this behavior in vue components for convenience.
Le jeu. 29 oct. 2020 à 14:17, Mattias Fjellvang <notifications@github.com>
a écrit :
… I believe this could happen if you call "destroy" and then re-mount it
again too quickly. It happened when we would call destroy, then remount
after 100ms. I extended this to 500ms and the error does not occur.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#337 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH22ZNKX7I7Y5ROPOJPEQYLSNFTNHANCNFSM4HDQ7XWA>
.
--
*Documents*, atelier de graphisme
28 rue Naudin 31200 Toulouse
https://documents.design
|
still occuring in 2021, |
This isn't fixed after running 'yarn add @glidejs/glide' |
I was able to fix the issue in mine by calling the glideMount function in the useEffect hook like this:
the handleFeaturedContent function makes an axios call and then sets state that glide uses. |
First off - thanks for an excellent, lightweight library!
I've been using this in my project for a while, and I have a lot of dynamic carousels which pull images in based on some data.
What I've found seems pretty severe, and that is - if a carousel has no slides, and it is of type
carousel
, it immediately causes the browser to use 110% CPU, freezing the tab (or often, the entire machine) up.This happens on both Chrome and Firefox but I'd recommend running the recreation (attached) in firefox since chrome is really hard to kill once it gets stuck!
I created a recreation of the problem here:
https://github.com/beyonk-adventures/glide-empty-carousel-bug - check it out and use
npm run dev
Cheers
The text was updated successfully, but these errors were encountered: