Skip to content

Commit

Permalink
[VarDumper] Make the line clickable to toggle dumps
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 31, 2016
1 parent b835ab1 commit 2697dd5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php
Expand Up @@ -190,6 +190,8 @@ function a(e, f) {
f(e.target, e);
} else if ('A' == e.target.parentNode.tagName) {
f(e.target.parentNode, e);
} else if (e.target.nextElementSibling && 'A' == e.target.nextElementSibling.tagName) {
f(e.target.nextElementSibling, e, true);
}
});
};
Expand All @@ -209,7 +211,7 @@ function isCtrlKey(e) {
}
}
});
a('click', function (a, e) {
a('click', function (a, e, c) {
if (/\bsf-dump-toggle\b/.test(a.className)) {
e.preventDefault();
if (!toggle(a, isCtrlKey(e))) {
Expand All @@ -230,7 +232,8 @@ function isCtrlKey(e) {
}
}
if (doc.getSelection) {
if (c) {
} else if (doc.getSelection) {
try {
doc.getSelection().removeAllRanges();
} catch (e) {
Expand Down

0 comments on commit 2697dd5

Please sign in to comment.