Commit 7b4e5c99 authored by Curtis Adam's avatar Curtis Adam

Card Editor: Add a return key event for the subject input field

parent d29b5a19
......@@ -317,8 +317,10 @@ export let CardNavigation = class CardNavigation {
keyCodes = [9];
}
if (Route.isEditMode()) {
if ($('.learningGoalLevelButton').is(":focus")) {
keyCodes = [9, 37, 39];
if ($('#subjectEditor').is(":focus")) {
keyCodes = [9, 13];
} else if ($('.learningGoalLevelButton').is(":focus")) {
keyCodes = [9, 13, 37, 39];
} else {
keyCodes = [9];
}
......@@ -352,6 +354,9 @@ export let CardNavigation = class CardNavigation {
}
}
break;
case 13:
CardEditor.setEditorButtonFocus();
break;
case 32:
if (CardNavigation.isVisible()) {
if (Route.isCardset() || Route.isPresentationOrDemo()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment