Skip to content

Commit 5b7745d

Browse files
author
Guillaume Chau
committed
Fix collapse all on Mac OS
1 parent 4f10454 commit 5b7745d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/devtools/components/StateInspector.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ export default {
7878
})
7979
},
8080
dataTypeTooltip () {
81-
return '<span class="keyboard">Ctrl</span> + <i class="material-icons">mouse</i>: Collapse All<br><span class="keyboard">Shift</span> + <i class="material-icons">mouse</i>: Expand All'
81+
let ctrlKey = navigator.platform === 'MacIntel' ? '&#8984;' : 'Ctrl'
82+
return `<span class="keyboard">${ctrlKey}</span> + <i class="material-icons">mouse</i>: Collapse All<br><span class="keyboard">Shift</span> + <i class="material-icons">mouse</i>: Expand All`
8283
}
8384
},
8485
methods: {
@@ -95,7 +96,7 @@ export default {
9596
},
9697
toggle (dataType, event = null) {
9798
if (event) {
98-
if (event.ctrlKey) {
99+
if (event.ctrlKey || event.metaKey) {
99100
return this.setExpandToAll(false)
100101
} else if (event.shiftKey) {
101102
return this.setExpandToAll(true)

0 commit comments

Comments
 (0)