问题描述
我尝试在另一个模态中包含一个模态。但是,我在firefox中遇到类似太多递归
的错误。
I try to have a modal inside another modal. However, I got an error like too much recursion
in firefox.
我使用了最新的jQuery和Twitter引导程序,但仍然有这个问题。
I used the latest jQuery and Twitter bootstrap but still have this problem.
这里是显示错误
您可以在控制台 Uncaught RangeError中发现错误:超出最大调用堆栈大小
或太多的递归
有人知道如何解决吗?谢谢
Does anyone know how to fix it? Thanks
推荐答案
好的,似乎已经发现了一个问题。
Ok, it seems like an issue that has been discovered.
(显然,我应该使用关键字 Uncaught RangeError:超出最大调用堆栈大小,而不是太多的递归 :()
(apparently I should use key word "Uncaught RangeError: Maximum call stack size exceeded" instead of "too much recursion" :( )
这是解决方案。
1。修改此帖子中的modal.js
href = https://github.com/twbs/bootstrap/pull/5022 rel = noreferrer> https://github.com/twbs/bootstrap/pull/5022
in this post, https://github.com/twbs/bootstrap/pull/5022
@onassar提出解决方案
@onassar bring up a solution
模态的注意力不集中(pfft,我可以
自己做:P),因此,多个模态不会挑战另一个
的焦点(这导致了无限循环和
rangerror /递归循环)。
The result of this is the modal's don't get focused upon (pfft, I can do that myself :P), and thus, the multiple modals don't challenge one-another for focus (which resulted in an infinite loop, and a rangerror/recursive loop).
希望有帮助:)
我尝试过而且有效。 ()
I tried and it works. (plunker)
2.。使用解决这个问题
似乎效果很好。
3。等待官方解决方案。
在其,他们确实想在某个时候重写此模式插件。
In their roadmap, they do want to rewrite this modal plugin at some point.
这篇关于为什么使用twitter bootstrap的多个模式会得到太多的递归错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!