Maximum call stack size exceeded when changing a class - Bootstrap, jQuery

强颜欢笑 提交于 2019-12-10 16:56:40

问题


I'm using jQuery 2.1.1, jQuery UI 1.11, Bootstrap 3.2, Fuel UX 2.3 (for the form wizard only) and BootstrapValidator v0.5.1-dev.

I have a huge bootstrapped form in a Fuel UX Wizard, with BootstrapValidator validation, along with a ton of jQuery for events and stuff(the total page is 1900 lines, that's why i haven't provided any code).

I had a div with class col-xs-8 around all of my form, everything was working fine. Then i changed it to class="container" (only change in the code, played it a couple of times back and forth), and now Chrome's console says :

Uncaught RangeError: Maximum call stack size exceeded 

Why?

I have checked the call stack, there's nothing but jQuery functions there(so it shouldn't be something i or the BootstrapValidator has launched, should it?).

I have another page, with the same enviorenement, similar size and similar code - there the change from .col-xs-8 to .container went without issues.

Update: I discovered that if i leave the main div without a class, i also get the RangeError. Sooo here's my JS https://gist.github.com/sofixa/be2e575cf8a198c1cf89


回答1:


If your form is NOT structured by Bootstrap classes (the element containing field and associated label does NOT have form-group class), you will see the error :

Uncaught RangeError: Maximum call stack size exceeded

Reference : Maximum call stack size exceeded error warning in the official docs.



来源:https://stackoverflow.com/questions/25265667/maximum-call-stack-size-exceeded-when-changing-a-class-bootstrap-jquery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!