mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-29 02:30:03 +00:00
fix: keyboard shortcuts from firing when editing text
This commit is contained in:
parent
c55b65b2d5
commit
9a9ae6185e
2 changed files with 16 additions and 0 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue