feature #19796 [VarDumper] Make the line clickable to toggle dumps (nicolas-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
This commit is contained in:
Fabien Potencier 2016-08-31 11:32:07 -07:00
commit 16c5c76052

View File

@ -205,6 +205,8 @@ return function (root, x) {
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);
}
});
};
@ -238,7 +240,7 @@ return function (root, x) {
}
}
});
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))) {
@ -259,7 +261,8 @@ return function (root, x) {
}
}
if (doc.getSelection) {
if (c) {
} else if (doc.getSelection) {
try {
doc.getSelection().removeAllRanges();
} catch (e) {