bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

navmenu: Maximum call stack size exceeded

Open mcardia opened this issue 8 years ago • 5 comments

This error happens on toggle the navmenu.

<nav class="navmenu navmenu-default navmenu-fixed-left offcanvas">

The toggle code: <li><a class="navbar-link" class="navbar-toggle" data-toggle="offcanvas" data-recalc="false" data-target=".navmenu" data-canvas="body"><i class="fa fa-tasks" aria-hidden="true"></i></a></li>

It´s only happens when the container (body) is big. I have a table there. If the table has few rows it works, but if the table has a lot of rows (>1300) it raises this error. Any tips?

RangeError: Maximum call stack size exceeded /gci/js/jquery.min.js:2 ga.select() /gci/js/jquery.min.js:2 Function.ga as find /gci/js/jquery.min.js:2 r.fn.init.find() /gci/bootstrap/js/jasny-bootstrap.min.js:6 b.getCanvasElements() /gci/bootstrap/js/jasny-bootstrap.min.js:6 b.show() /gci/bootstrap/js/jasny-bootstrap.min.js:6 b.toggle() /gci/bootstrap/js/jasny-bootstrap.min.js:6 new b() /gci/bootstrap/js/jasny-bootstrap.min.js:6 HTMLDivElement.() /gci/js/jquery.min.js:2 Function.each() /gci/js/jquery.min.js:2 r.fn.init.each()

mcardia avatar Dec 15 '16 18:12 mcardia

@mcardia please create an example of this, for ex. in jsfiddle

Minstel avatar Jan 11 '17 04:01 Minstel

@mcardia I tested this and do not see an error. Tested in Crome (56.0.2924.87) and Firefox (53.0a2). Closing as there is no feedback.

Minstel avatar Feb 21 '17 17:02 Minstel

https://jsfiddle.net/mcardia/06308d4j/3/

Happens with Chrome. On Firefox it works.

mcardia avatar Apr 07 '17 19:04 mcardia

Might have to do with finding fixed positioned elements.

jasny avatar Apr 11 '17 18:04 jasny

Stumbled across this bug while working on a project using a bootstrap template, which depends on this extension to upload files. For me it was an infinite loop on the "reset" event, because removing the line that says trigger("reset.bs.fileinput") fixes the issue. Everything works fine now. I didn't make a pull request because that isn't probably the fix that most people will want.

allan-null avatar Feb 11 '21 14:02 allan-null