Bug fixed with shortcut keys
This commit is contained in:
1 parent
3db5e6935e
commit
a9a82ba854
1 file changed
+3
-3
@@ -259,6 +259,9 @@ function newCanvas () {
|
||||
|
||||
if ((event.ctrlKey === true || event.metaKey === true)) {
|
||||
if (event.keyCode >= 65 && event.keyCode <= 90) {
|
||||
/* From here we prevent the default behaviour */
|
||||
event.preventDefault()
|
||||
|
||||
let nodeUsingThisKey = canvas.strategySpace.workspace.getNodeByShortcutKey(event.key)
|
||||
|
||||
if (nodeOnFocus === undefined && nodeUsingThisKey !== undefined) {
|
||||
@@ -267,9 +270,6 @@ function newCanvas () {
|
||||
return
|
||||
}
|
||||
|
||||
/* From here we prevent the default behaviour */
|
||||
event.preventDefault()
|
||||
|
||||
/* If there is a node in focus, we try to assign the key to it. */
|
||||
if (nodeUsingThisKey !== undefined && nodeOnFocus !== undefined) {
|
||||
if (nodeUsingThisKey.id === nodeOnFocus.id) {
|
||||
|
||||
Reference in new issue
Block a user