From 2706e59ec01bede1a647e5d7ddfeb409950e7ba7 Mon Sep 17 00:00:00 2001 From: Pankaj Bhojwani Date: Wed, 16 Mar 2022 14:28:20 -0700 Subject: [PATCH 1/3] move keyboard shortcut text to caption --- .../nodejs/adaptivecards-designer/src/help-dialog.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/nodejs/adaptivecards-designer/src/help-dialog.ts b/source/nodejs/adaptivecards-designer/src/help-dialog.ts index fd6d2f1900..cd8cfbc985 100644 --- a/source/nodejs/adaptivecards-designer/src/help-dialog.ts +++ b/source/nodejs/adaptivecards-designer/src/help-dialog.ts @@ -34,12 +34,14 @@ export class HelpDialog extends Dialog { keyboardHeading.innerText = "Keyboard Shortcuts"; this._renderedElement.appendChild(keyboardHeading); - let keyboardText = document.createElement("div"); - keyboardText.innerText = "These keyboard shortcuts only work when the keyboard focus is within either the card payload or sample data editors"; - this._renderedElement.appendChild(keyboardText); - this._renderedElement.appendChild(document.createElement("br")); - let shortcutTable = document.createElement("table"); + + let tableCaption = shortcutTable.createCaption(); + tableCaption.style.textAlign = "left"; + tableCaption.innerHTML = "These keyboard shortcuts only work when the keyboard focus is within either the card payload or sample data editors" + + shortcutTable.appendChild(document.createElement("br")); + shortcutTable.appendChild(this._getShortcutRow("Shortcut", "Description", true)); shortcutTable.appendChild(this._getShortcutRow("Alt-F1", "Show help dialog for editor")); shortcutTable.appendChild(this._getShortcutRow("Ctrl-M", "Toggle behavior of TAB key. By default, pressing TAB will insert a TAB character. When toggled, pressing TAB will navigate to the next focusable item.")); From 740869457c272218740cab6e9fb14aa803454de5 Mon Sep 17 00:00:00 2001 From: Pankaj Bhojwani Date: Wed, 16 Mar 2022 15:24:48 -0700 Subject: [PATCH 2/3] use innerText instead --- source/nodejs/adaptivecards-designer/src/help-dialog.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/nodejs/adaptivecards-designer/src/help-dialog.ts b/source/nodejs/adaptivecards-designer/src/help-dialog.ts index cd8cfbc985..7f0251050b 100644 --- a/source/nodejs/adaptivecards-designer/src/help-dialog.ts +++ b/source/nodejs/adaptivecards-designer/src/help-dialog.ts @@ -38,7 +38,7 @@ export class HelpDialog extends Dialog { let tableCaption = shortcutTable.createCaption(); tableCaption.style.textAlign = "left"; - tableCaption.innerHTML = "These keyboard shortcuts only work when the keyboard focus is within either the card payload or sample data editors" + tableCaption.innerText = "These keyboard shortcuts only work when the keyboard focus is within either the card payload or sample data editors" shortcutTable.appendChild(document.createElement("br")); From 1e923a125d8716ebf8f8434b98bfea33ed268785 Mon Sep 17 00:00:00 2001 From: Canhua Li Date: Thu, 17 Mar 2022 13:31:09 -0700 Subject: [PATCH 3/3] Update source/nodejs/adaptivecards-designer/src/help-dialog.ts --- source/nodejs/adaptivecards-designer/src/help-dialog.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/nodejs/adaptivecards-designer/src/help-dialog.ts b/source/nodejs/adaptivecards-designer/src/help-dialog.ts index 7f0251050b..8187f73907 100644 --- a/source/nodejs/adaptivecards-designer/src/help-dialog.ts +++ b/source/nodejs/adaptivecards-designer/src/help-dialog.ts @@ -38,7 +38,7 @@ export class HelpDialog extends Dialog { let tableCaption = shortcutTable.createCaption(); tableCaption.style.textAlign = "left"; - tableCaption.innerText = "These keyboard shortcuts only work when the keyboard focus is within either the card payload or sample data editors" + tableCaption.innerText = "These keyboard shortcuts only work when the keyboard focus is within either the card payload or sample data editors"; shortcutTable.appendChild(document.createElement("br"));