mirror of
https://github.com/laurent22/joplin.git
synced 2025-02-01 19:15:01 +02:00
Electron: Fixes #481: Shortcuts were not working when text editor had focus
This commit is contained in:
parent
16635defcd
commit
55332d7671
@ -428,7 +428,14 @@ class NoteTextComponent extends React.Component {
|
|||||||
if (this.editor_) {
|
if (this.editor_) {
|
||||||
this.editor_.editor.renderer.on('afterRender', this.onAfterEditorRender_);
|
this.editor_.editor.renderer.on('afterRender', this.onAfterEditorRender_);
|
||||||
|
|
||||||
const cancelledKeys = ['Ctrl+F', 'Ctrl+T', 'Ctrl+P', 'Ctrl+Q', 'Ctrl+L', 'Ctrl+,'];
|
const cancelledKeys = [];
|
||||||
|
const letters = ['F', 'T', 'P', 'Q', 'L', ','];
|
||||||
|
for (let i = 0; i < letters.length; i++) {
|
||||||
|
const l = letters[i];
|
||||||
|
cancelledKeys.push('Ctrl+' + l);
|
||||||
|
cancelledKeys.push('Command+' + l);
|
||||||
|
}
|
||||||
|
|
||||||
for (let i = 0; i < cancelledKeys.length; i++) {
|
for (let i = 0; i < cancelledKeys.length; i++) {
|
||||||
const k = cancelledKeys[i];
|
const k = cancelledKeys[i];
|
||||||
this.editor_.editor.commands.bindKey(k, () => {
|
this.editor_.editor.commands.bindKey(k, () => {
|
||||||
|
3
ElectronClient/app/package-lock.json
generated
3
ElectronClient/app/package-lock.json
generated
@ -2641,7 +2641,8 @@
|
|||||||
"jsbn": {
|
"jsbn": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"json-schema": {
|
"json-schema": {
|
||||||
"version": "0.2.3",
|
"version": "0.2.3",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user