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.