diff --git a/app-src/scripts/edit-on-click/edit-on-click-d.js b/app-src/scripts/edit-on-click/edit-on-click-d.js index fba2e66586..a5a8600dd8 100644 --- a/app-src/scripts/edit-on-click/edit-on-click-d.js +++ b/app-src/scripts/edit-on-click/edit-on-click-d.js @@ -66,6 +66,12 @@ modelCopy = vm.editOnClick; $timeout(function() { inputEl = $element.find('input'); + + // prevent keyboard shortcuts from firing when here + inputEl[0].addEventListener('keydown', (ev) => { + ev.stopPropagation(); + }); + inputEl[0].focus(); inputEl[0].value = modelCopy; setTimeout(() => { diff --git a/app-src/scripts/inline-markdown/inline-markdown-d.js b/app-src/scripts/inline-markdown/inline-markdown-d.js index cd57618fc0..a658b0828e 100644 --- a/app-src/scripts/inline-markdown/inline-markdown-d.js +++ b/app-src/scripts/inline-markdown/inline-markdown-d.js @@ -59,6 +59,12 @@ } } + function stopPropagation(ev) { + console.log('STOP'); + + ev.stopPropagation(); + } + if (IS_ELECTRON) { waitForMarkedTimeOut = $timeout(() => { makeLinksWorkForElectron(); @@ -77,8 +83,12 @@ textareaEl[0].focus(); textareaEl.on('keypress', keypressHandler); + // prevent keyboard shortcuts from firing when here + textareaEl.on('keydown', stopPropagation); + textareaEl.on('$destroy', () => { textareaEl.off('keypress', keypressHandler); + textareaEl.off('keydown', stopPropagation); }); }); }