diff --git a/web/pgadmin/static/js/sqleditor/keyboard_shortcuts.js b/web/pgadmin/static/js/sqleditor/keyboard_shortcuts.js index d31c6bed..c6175629 100644 --- a/web/pgadmin/static/js/sqleditor/keyboard_shortcuts.js +++ b/web/pgadmin/static/js/sqleditor/keyboard_shortcuts.js @@ -26,15 +26,15 @@ function keyboardShortcuts(sqlEditorController, queryToolActions, event) { } else if (((this.isMac() && event.metaKey) || (!this.isMac() && event.ctrlKey)) && event.shiftKey && keyCode === FWD_SLASH_KEY) { _stopEventPropagation(); - queryToolActions.commentLineCode(sqlEditorController); + queryToolActions.commentBlockCode(sqlEditorController); } else if (((this.isMac() && event.metaKey) || (!this.isMac() && event.ctrlKey)) && - event.shiftKey && keyCode === PERIOD_KEY) { + keyCode === FWD_SLASH_KEY) { _stopEventPropagation(); - queryToolActions.uncommentLineCode(sqlEditorController); + queryToolActions.commentLineCode(sqlEditorController); } else if (((this.isMac() && event.metaKey) || (!this.isMac() && event.ctrlKey)) && - keyCode === FWD_SLASH_KEY) { + keyCode === PERIOD_KEY) { _stopEventPropagation(); - queryToolActions.commentBlockCode(sqlEditorController); + queryToolActions.uncommentLineCode(sqlEditorController); } function _stopEventPropagation() { diff --git a/web/pgadmin/tools/datagrid/__init__.py b/web/pgadmin/tools/datagrid/__init__.py index d3a4a9dc..de0f2950 100644 --- a/web/pgadmin/tools/datagrid/__init__.py +++ b/web/pgadmin/tools/datagrid/__init__.py @@ -217,7 +217,7 @@ def panel(trans_id, is_query_tool, editor_title): is_desktop_mode=app.PGADMIN_RUNTIME, is_linux=is_linux_platform, is_new_browser_tab=new_browser_tab, - client_plaform=user_agent.platform + client_platform=user_agent.platform ) diff --git a/web/pgadmin/tools/datagrid/templates/datagrid/index.html b/web/pgadmin/tools/datagrid/templates/datagrid/index.html index 35d581b7..2fa050e4 100644 --- a/web/pgadmin/tools/datagrid/templates/datagrid/index.html +++ b/web/pgadmin/tools/datagrid/templates/datagrid/index.html @@ -58,7 +58,7 @@ diff --git a/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js b/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js index d16ac562..3b731620 100644 --- a/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js +++ b/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js @@ -181,7 +181,6 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { macKeysSetup(); event.which = FWD_SLASH_KEY; - event.shiftKey = true; keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); }); @@ -196,7 +195,6 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { windowsKeysSetup(); event.which = FWD_SLASH_KEY; - event.shiftKey = true; keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); }); @@ -216,7 +214,6 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { macKeysSetup(); event.which = FWD_SLASH_KEY; - event.shiftKey = true; }); it('does nothing', () => { @@ -247,7 +244,6 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { macKeysSetup(); event.which = PERIOD_KEY; - event.shiftKey = true; keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); }); @@ -261,7 +257,6 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { windowsKeysSetup(); event.which = PERIOD_KEY; - event.shiftKey = true; keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); }); @@ -281,7 +276,6 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { macKeysSetup(); event.which = PERIOD_KEY; - event.shiftKey = true; }); it('does nothing', () => { @@ -310,6 +304,7 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { macKeysSetup(); event.which = FWD_SLASH_KEY; + event.shiftKey = true; keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); }); @@ -326,6 +321,7 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { windowsKeysSetup(); event.which = FWD_SLASH_KEY; + event.shiftKey = true; keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); }); @@ -345,6 +341,7 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { macKeysSetup(); event.which = FWD_SLASH_KEY; + event.shiftKey = true; keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('does nothing', () => { @@ -355,6 +352,7 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { windowsKeysSetup(); event.which = FWD_SLASH_KEY; + event.shiftKey = true; keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('does nothing', () => {