mirror of
https://github.com/codex-team/editor.js
synced 2024-06-10 18:03:25 +02:00
parent
8696b9cab5
commit
f951ceddf6
|
@ -82,6 +82,7 @@
|
|||
"Proxy": true,
|
||||
"Symbol": true,
|
||||
"$": true,
|
||||
"_": true
|
||||
"_": true,
|
||||
"setTimeout": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3439,13 +3439,14 @@ var BlockEvents = function (_Module) {
|
|||
break;
|
||||
case _.keyCodes.DOWN:
|
||||
case _.keyCodes.RIGHT:
|
||||
this.arrowRightAndDownPressed();
|
||||
this.arrowRightAndDown();
|
||||
break;
|
||||
case _.keyCodes.UP:
|
||||
case _.keyCodes.LEFT:
|
||||
this.arrowLeftAndUpPressed();
|
||||
this.arrowLeftAndUp();
|
||||
break;
|
||||
default:
|
||||
this.defaultHandler();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3561,8 +3562,8 @@ var BlockEvents = function (_Module) {
|
|||
*/
|
||||
|
||||
}, {
|
||||
key: "arrowRightAndDownPressed",
|
||||
value: function arrowRightAndDownPressed() {
|
||||
key: "arrowRightAndDown",
|
||||
value: function arrowRightAndDown() {
|
||||
this.Editor.Caret.navigateNext();
|
||||
this.Editor.Toolbar.close();
|
||||
}
|
||||
|
@ -3571,11 +3572,21 @@ var BlockEvents = function (_Module) {
|
|||
*/
|
||||
|
||||
}, {
|
||||
key: "arrowLeftAndUpPressed",
|
||||
value: function arrowLeftAndUpPressed() {
|
||||
key: "arrowLeftAndUp",
|
||||
value: function arrowLeftAndUp() {
|
||||
this.Editor.Caret.navigatePrevious();
|
||||
this.Editor.Toolbar.close();
|
||||
}
|
||||
/**
|
||||
* Default keydown handler
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "defaultHandler",
|
||||
value: function defaultHandler() {
|
||||
this.Editor.BlockManager.currentBlock.selected = false;
|
||||
this.Editor.Toolbar.close();
|
||||
}
|
||||
}]);
|
||||
|
||||
return BlockEvents;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,15 +29,16 @@ export default class BlockEvents extends Module {
|
|||
|
||||
case _.keyCodes.DOWN:
|
||||
case _.keyCodes.RIGHT:
|
||||
this.arrowRightAndDownPressed();
|
||||
this.arrowRightAndDown();
|
||||
break;
|
||||
|
||||
case _.keyCodes.UP:
|
||||
case _.keyCodes.LEFT:
|
||||
this.arrowLeftAndUpPressed();
|
||||
this.arrowLeftAndUp();
|
||||
break;
|
||||
|
||||
default:
|
||||
this.defaultHandler();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +158,7 @@ export default class BlockEvents extends Module {
|
|||
/**
|
||||
* Handle right and down keyboard keys
|
||||
*/
|
||||
private arrowRightAndDownPressed(): void {
|
||||
private arrowRightAndDown(): void {
|
||||
this.Editor.Caret.navigateNext();
|
||||
|
||||
this.Editor.Toolbar.close();
|
||||
|
@ -166,9 +167,18 @@ export default class BlockEvents extends Module {
|
|||
/**
|
||||
* Handle left and up keyboard keys
|
||||
*/
|
||||
private arrowLeftAndUpPressed(): void {
|
||||
private arrowLeftAndUp(): void {
|
||||
this.Editor.Caret.navigatePrevious();
|
||||
|
||||
this.Editor.Toolbar.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Default keydown handler
|
||||
*/
|
||||
private defaultHandler(): void {
|
||||
this.Editor.BlockManager.currentBlock.selected = false;
|
||||
|
||||
this.Editor.Toolbar.close();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue