Bug 1529680 - [release 127] fixed keyboard shortcuts on MacOS [#7892] (#7893). r=dwalsh
authorbamanczak <bamanczak@gmail.com>
Mon, 25 Feb 2019 10:00:55 -0500
changeset 518966 183f1a860db46789f2bda30951c61e49c01cb9f6
parent 518965 049f4a9c8486e9b9bd8cb54513688bd86abb2084
child 518967 6b5b546aac14484f94eecb8a776460357f5a9cea
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
bugs1529680
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1529680 - [release 127] fixed keyboard shortcuts on MacOS [#7892] (#7893). r=dwalsh
devtools/client/debugger/new/dist/debugger.css
devtools/client/debugger/new/src/components/WelcomeBox.css
devtools/client/debugger/new/src/utils/text.js
--- a/devtools/client/debugger/new/dist/debugger.css
+++ b/devtools/client/debugger/new/dist/debugger.css
@@ -4206,16 +4206,22 @@ html[dir="rtl"] .object-node {
   text-align: end;
   padding-right: 10px;
   font-family: var(--monospace-font-family);
   font-size: 14px;
   line-height: 18px;
   color: var(--theme-body-color);
 }
 
+:root[platform="mac"] .welcomebox .shortcutKey,
+.launchpad-root[platform="mac"] .welcomebox .shortcutKey {
+  font-family: system-ui, -apple-system, sans-serif;
+  font-weight: 500;
+}
+
 .shortcutLabel {
   text-align: start;
   padding-left: 10px;
   font-size: 14px;
   line-height: 18px;
 }
 
 .shortcutFunction {
--- a/devtools/client/debugger/new/src/components/WelcomeBox.css
+++ b/devtools/client/debugger/new/src/components/WelcomeBox.css
@@ -56,16 +56,22 @@
   text-align: end;
   padding-right: 10px;
   font-family: var(--monospace-font-family);
   font-size: 14px;
   line-height: 18px;
   color: var(--theme-body-color);
 }
 
+:root[platform="mac"] .welcomebox .shortcutKey,
+.launchpad-root[platform="mac"] .welcomebox .shortcutKey {
+  font-family: system-ui, -apple-system, sans-serif;
+  font-weight: 500;
+}
+
 .shortcutLabel {
   text-align: start;
   padding-left: 10px;
   font-size: 14px;
   line-height: 18px;
 }
 
 .shortcutFunction {
--- a/devtools/client/debugger/new/src/utils/text.js
+++ b/devtools/client/debugger/new/src/utils/text.js
@@ -24,20 +24,20 @@ const isMacOS = appinfo.OS === "Darwin";
  * For Win/Lin this replaces CommandOrControl or CmdOrCtrl with Ctrl
  *
  * @memberof utils/text
  * @static
  */
 export function formatKeyShortcut(shortcut: string): string {
   if (isMacOS) {
     return shortcut
-      .replace(/Shift\+/g, "\u21E7 ")
-      .replace(/Command\+|Cmd\+/g, "\u2318 ")
-      .replace(/CommandOrControl\+|CmdOrCtrl\+/g, "\u2318 ")
-      .replace(/Alt\+/g, "\u2325 ");
+      .replace(/Shift\+/g, "\u21E7")
+      .replace(/Command\+|Cmd\+/g, "\u2318")
+      .replace(/CommandOrControl\+|CmdOrCtrl\+/g, "\u2318")
+      .replace(/Alt\+/g, "\u2325");
   }
   return shortcut
     .replace(/CommandOrControl\+|CmdOrCtrl\+/g, `${L10N.getStr("ctrl")}+`)
     .replace(/Shift\+/g, "Shift+");
 }
 
 /**
  * Truncates the received text to the maxLength in the format: