[VarDumper] Make the line clickable to toggle dumps

This commit is contained in:
Nicolas Grekas 2016-08-31 10:30:10 +02:00
parent b835ab1d39
commit 2697dd5466

View File

@ -190,6 +190,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);
}
});
};
@ -209,7 +211,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))) {
@ -230,7 +232,8 @@ return function (root, x) {
}
}
if (doc.getSelection) {
if (c) {
} else if (doc.getSelection) {
try {
doc.getSelection().removeAllRanges();
} catch (e) {