8000 bug #39525 [VarDumper] dont hide any nodes until JS is proven to work… · symfony/symfony@3741b06 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3741b06

Browse files
bug #39525 [VarDumper] dont hide any nodes until JS is proven to work (nicolas-grekas)
This PR was merged into the 5.2 branch. Discussion ---------- [VarDumper] dont hide any nodes until JS is proven to work | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #39394 | License | MIT | Doc PR | - Replaces #39523 Commits ------- 42ad1ec [VarDumper] dont hide any nodes until JS is proven to work
2 parents 904b05a + 42ad1ec commit 3741b06

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ protected function getDumpHeader()
171171
e.addEventListener(n, cb, false);
172172
};
173173
174+
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; }';
175+
(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle);
176+
refStyle = doc.createElement('style');
174177
(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle);
175178
176179
if (!doc.addEventListener) {
@@ -665,9 +668,6 @@ function showCurrent(state)
665668
pre.sf-dump span {
666669
display: inline;
667670
}
668-
pre.sf-dump .sf-dump-compact {
669-
display: none;
670-
}
671671
pre.sf-dump a {
672672
text-decoration: none;
673673
cursor: pointer;
@@ -699,12 +699,6 @@ function showCurrent(state)
699699
padding:0;
700700
background:none;
701701
}
702-
.sf-dump-str-collapse .sf-dump-str-collapse {
703-
display: none;
704-
}
705-
.sf-dump-str-expand .sf-dump-str-expand {
706-
display: none;
707-
}
708702
.sf-dump-public.sf-dump-highlight,
709703
.sf-dump-protected.sf-dump-highlight,
710704
.sf-dump-private.sf-dump-highlight,

0 commit comments

Comments
 (0)
0