Skip to content

Commit

Permalink
Merge pull request #28132 from michalvavrik/feature/docs-dont-collaps…
Browse files Browse the repository at this point in the history
…e-desc-on-copy-btn

Docs - do not collapse description on copy button click
  • Loading branch information
gsmet committed Sep 21, 2022
2 parents b65be7e + 768a685 commit 18b3a02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/src/main/asciidoc/javascript/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ function makeCollapsibleHandler(descDiv, td, row,
return;
}

// don't collapse if the target is button with attribute "do-not-collapse"
if( (target.localName == 'button' && target.hasAttribute("do-not-collapse"))) {
return;
}

var isCollapsed = descDiv.classList.contains('description-collapsed');
if( isCollapsed ) {
collapsibleSpan.childNodes.item(0).nodeValue = 'Show less';
Expand Down

0 comments on commit 18b3a02

Please sign in to comment.