Skip to content

Commit

Permalink
[VarDumper] Fix #14481 : Open tree recursively on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
romainneutron committed Apr 27, 2015
1 parent 3a404f8 commit af54bda
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 @@ -176,6 +176,9 @@ function a(e, f) {
}
});
};
function isCtrlKey(e) {
return e.ctrlKey || e.metaKey;
}
addEventListener(root, 'mouseover', function (e) {
if ('' != refStyle.innerHTML) {
refStyle.innerHTML = '';
Expand All @@ -192,7 +195,7 @@ function a(e, f) {
a('click', function (a, e) {
if (/\bsf-dump-toggle\b/.test(a.className)) {
e.preventDefault();
if (!toggle(a, e.ctrlKey)) {
if (!toggle(a, isCtrlKey(e))) {
var r = doc.getElementById(a.getAttribute('href').substr(1)),
s = r.previousSibling,
f = r.parentNode,
Expand All @@ -206,7 +209,7 @@ function a(e, f) {
r.innerHTML = r.innerHTML.replace(new RegExp('^'+f[0].replace(rxEsc, '\\$1'), 'mg'), t[0]);
}
if ('sf-dump-compact' == r.className) {
toggle(s, e.ctrlKey);
toggle(s, isCtrlKey(e));
}
}
Expand Down

0 comments on commit af54bda

Please sign in to comment.