Problem/Motivation

The drupal.collapse library is disabled in bootstrap.info.yml:

# ...
libraries-override:
  core/drupal.batch: bootstrap/drupal.batch
  core/drupal.collapse: false
# ...

So the <details> elements will not receive core's polyfill and aria assets, defined in drupal.collapse.
Bootstrap has a js/misc/collapse.js asset, but it is not added in info.yml or libraries.yml, so it does not load anywhere.

Proposed resolution

Override core collapse.js with Bootstrap's version:

libraries-override:
  core/drupal.collapse:
    js:
      misc/collapse.js: js/misc/collapse.js
Files: 
CommentFileSizeAuthor
#2 details-closed.png19.36 KBdeveldru
#2 details-closed.png19.36 KBdeveldru

Comments

gpap created an issue. See original summary.

develdru’s picture

FileSize
19.36 KB
19.36 KB

@gpap the details tag is showing a collapsible content even if the drupal collapse is set to false. It is taking default functionality of html5.
more in the screenshots.
With your code, I don't see any change.

libraries-override:
  core/drupal.collapse:
    js:
      misc/collapse.js: js/misc/collapse.js