5 ms·
So I'm trying to integrate this with my site, and when I enabled gallery mode, I can no longer click to close, or hit the ESC key. Chrome's console seems to sho
by HorizonXP 13y ago
So I'm trying to integrate this with my site, and when I enabled gallery mode, I can no longer click to close, or hit the ESC key. Chrome's console seems to show a Uncaught RangeError: Maximum call stack size exceeded in jquery. Ideas?
- diiiimaaaa 13y agoPlease isolate your problem on CodePen and open a new issue on GitHub.
- HorizonXP 13y agoI'm still trying to isolate it, but it seems that in gallery mode, when mfpClose is fired, it gets into a infinite loop, which causes the stack to overflow, and ultimately cause the page to crash. I'm using jQuery 1.9.1 and Twitter Bootstrap. On a whim, I looked at your example code and noticed you were using Zepto. I tried switching to Zepto, and this fixed the issue with your gallery, and it closed properly. However, it breaks Bootstrap. Did you only test with Zepto? There might be an issue in jQuery, where you're selecting elements incorrectly, thus spawning too many events.
- saraid216 13y ago> Uncaught RangeError: Maximum call stack size exceeded Chrome should give you a stack trace for that. Look for patterns: in my experience, that generally shows up when there's a mutual unterminated recursion, e.g. "A calls B, B calls A, A calls B, ..." or "A calls B calls C calls A calls B calls C ...".