Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5e6781d

Browse filesBrowse files
committed
bug #14855 [VarDumper] Changed tooltip to expand-all keybinding in OS X (taylankasap)
This PR was merged into the 2.7 branch. Discussion ---------- [VarDumper] Changed tooltip to expand-all keybinding in OS X | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #14828 | License | MIT | Doc PR | - Commits ------- 8809362 [VarDumper] Changed tooltip to expand-all keybinding in OS X
2 parents c2127a3 + 8809362 commit 5e6781d
Copy full SHA for 5e6781d

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ protected function getDumpHeader()
116116
var refStyle = doc.createElement('style'),
117117
rxEsc = /([.*+?^${}()|\[\]\/\\])/g,
118118
idRx = /\bsf-dump-\d+-ref[012]\w+\b/,
119+
keyHint = 0 <= navigator.platform.toUpperCase().indexOf('MAC') ? 'Cmd' : 'Ctrl',
119120
addEventListener = function (e, n, cb) {
120121
e.addEventListener(n, cb, false);
121122
};
@@ -255,7 +256,7 @@ function isCtrlKey(e) {
255256
} else {
256257
a.innerHTML += ' ';
257258
}
258-
a.title = (a.title ? a.title+'\n' : '')+'[Ctrl+click] Expand all children';
259+
a.title = (a.title ? a.title+'\n[' : '[')+keyHint+'+click] Expand all children';
259260
a.innerHTML += '<span>▼</span>';
260261
a.className += ' sf-dump-toggle';
261262
if ('sf-dump' != elt.parentNode.className) {
@@ -388,7 +389,7 @@ protected function style($style, $value, $attr = array())
388389
$style .= sprintf(' title="%s%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : '');
389390
} elseif ('note' === $style) {
390391
if (false !== $c = strrpos($v, '\\')) {
391-
return sprintf('<abbr title="%s" class=sf-dump-%s>%s</abbr>', $v, $style, substr($v, $c+1));
392+
return sprintf('<abbr title="%s" class=sf-dump-%s>%s</abbr>', $v, $style, substr($v, $c + 1));
392393
} elseif (':' === $v[0]) {
393394
return sprintf('<abbr title="`%s` resource" class=sf-dump-%s>%s</abbr>', substr($v, 1), $style, $v);
394395
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.