Skip to content

Commit

Permalink
feature #19796 [VarDumper] Make the line clickable to toggle dumps (n…
Browse files Browse the repository at this point in the history
…icolas-grekas)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Make the line clickable to toggle dumps

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| License       | MIT

The arrow to toggle dumps is too small. Let's make the text before it clickable.

Commits
-------

2697dd5 [VarDumper] Make the line clickable to toggle dumps
  • Loading branch information
fabpot committed Aug 31, 2016
2 parents 4fbf80d + 2697dd5 commit 16c5c76
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 @@ -205,6 +205,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 Down Expand Up @@ -238,7 +240,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 @@ -259,7 +261,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 16c5c76

Please sign in to comment.