admin管理员组文章数量:1417421
Collapsible(to hide and show data) is working fine in other browsers(opera,chrome).But ing to IE onclick
(on pany as shown in figure) data is showing (expanding) ,Onclick on same tag/button(pany) data is not hiding.In console error is showings as Object.keys: argument is not an Object
I found related question Object.keys not working in internet Explorer here but not applicable to my code(didn't help me).
Collapsible(to hide and show data) is working fine in other browsers(opera,chrome).But ing to IE onclick
(on pany as shown in figure) data is showing (expanding) ,Onclick on same tag/button(pany) data is not hiding.In console error is showings as Object.keys: argument is not an Object
I found related question Object.keys not working in internet Explorer here but not applicable to my code(didn't help me).
Share Improve this question edited Nov 21, 2022 at 8:11 starball 54.1k35 gold badges236 silver badges932 bronze badges asked Jun 4, 2018 at 8:30 Ramlal SRamlal S 1,6531 gold badge17 silver badges36 bronze badges 01 Answer
Reset to default 5As this is tagged with "bootstrap-4" I'm assuming it's related to this bug in Bootstrap 4.1.0 where all collapsibles were unclosable in IE11.
More specifically, it was line 334 in Bootstraps js/src/collapse.js
that was causing the problem. It was changed from
...typeof config === 'object' && config
to
...typeof config === 'object' && config ? config : {}
Quoting this page:
"If config is not an object, this is false. In IE, Object.keys(false) results in an error, while modern browsers return []"
The bug was fixed in subsequent versions. I had the same problem in a project recently and updating Bootstrap to version 4.1.1 fixed the problem.
(Update package.json with "bootstrap": "v4.1.1"
(or later) and run npm install
.)
TL;DR: It's a Bootstrap bug. Update Bootstrap to version 4.1.1 or later.
本文标签: javascriptCollapses not working on IE11 (Objectkeys argument is not an Object)Stack Overflow
版权声明:本文标题:javascript - Collapses not working on IE11 (Object.keys: argument is not an Object) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745260696a2650343.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论