Skip to content

Commit

Permalink
bug #48993 [VarDumper] Fix JS to expand / collapse (nicolas-grekas)
Browse files Browse the repository at this point in the history
This PR was merged into the 5.4 branch.

Discussion
----------

[VarDumper] Fix JS to expand / collapse

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #48545
| License       | MIT
| Doc PR        | -

As hinted in facebook/react#25897 (comment)

Commits
-------

19add97 [VarDumper] Fix JS to expand / collapse
  • Loading branch information
nicolas-grekas committed Jan 16, 2023
2 parents 4ae23e6 + 19add97 commit bf901b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php
Expand Up @@ -167,9 +167,9 @@ protected function getDumpHeader()
};
refStyle.innerHTML = 'pre.sf-dump .sf-dump-compact, .sf-dump-str-collapse .sf-dump-str-collapse, .sf-dump-str-expand .sf-dump-str-expand { display: none; }';
(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle);
doc.head.appendChild(refStyle);
refStyle = doc.createElement('style');
(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle);
doc.head.appendChild(refStyle);
if (!doc.addEventListener) {
addEventListener = function (element, eventName, callback) {
Expand Down

0 comments on commit bf901b8

Please sign in to comment.