mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 14:47:56 +01:00
Fix missing key on Firefox.
This commit is contained in:
parent
7637c3ed31
commit
65b0b0d819
@ -33,7 +33,7 @@ class DesignerKeyboard extends Keyboard {
|
|||||||
|
|
||||||
private static _disabled: boolean;
|
private static _disabled: boolean;
|
||||||
|
|
||||||
private static excludeFromEditor = ['Escape', 'F1', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12'];
|
private static excludeFromEditor = ['Enter', 'CapsLock', 'Escape', 'F1', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12'];
|
||||||
|
|
||||||
constructor(designer: Designer) {
|
constructor(designer: Designer) {
|
||||||
super();
|
super();
|
||||||
@ -164,16 +164,17 @@ class DesignerKeyboard extends Keyboard {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Should I open the editor ?
|
// Is a modifier ?
|
||||||
if (!['Enter', 'CapsLock'].includes(event.code)) {
|
if (event.ctrlKey || event.altKey || event.metaKey) {
|
||||||
const nodes = designer.getModel().filterSelectedTopics();
|
return;
|
||||||
if (nodes.length > 0) {
|
}
|
||||||
// If a modifier is press, the key selected must be ignored.
|
|
||||||
if (event.ctrlKey || event.altKey || event.metaKey) {
|
// If a node is selected, open the editor ...
|
||||||
return;
|
const topic = designer.getModel().selectedTopic();
|
||||||
}
|
if (topic) {
|
||||||
nodes[0].showTextEditor('');
|
event.stopPropagation();
|
||||||
}
|
event.preventDefault();
|
||||||
|
topic.showTextEditor(event.key);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user