mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-02-10 18:15:19 +08:00
Merge pull request 'Fix macros move cursor only for document editor' (#1715) from fix/macros-cursor-move into release/v9.2.0
This commit is contained in:
@ -104,6 +104,9 @@
|
||||
}
|
||||
else if (e.KeyCode === 37) // Left Arrow
|
||||
{
|
||||
if (_t.editor.editorId !== AscCommon.c_oEditorId.Word)
|
||||
return;
|
||||
|
||||
let doc = _t.editor.getLogicDocument();
|
||||
let curPara = doc.GetCurrentParagraph(true);
|
||||
let isRtl = (curPara ? curPara.isRtlDirection() : false);
|
||||
@ -120,6 +123,9 @@
|
||||
}
|
||||
else if (e.KeyCode === 38) // Top Arrow
|
||||
{
|
||||
if (_t.editor.editorId !== AscCommon.c_oEditorId.Word)
|
||||
return;
|
||||
|
||||
_t.addStepData('moveCursorUp', [{
|
||||
isAddSelect: e.IsShift(),
|
||||
isWord: e.IsCtrl()
|
||||
@ -127,6 +133,9 @@
|
||||
}
|
||||
else if (e.KeyCode === 39) // Right Arrow
|
||||
{
|
||||
if (_t.editor.editorId !== AscCommon.c_oEditorId.Word)
|
||||
return;
|
||||
|
||||
let doc = _t.editor.getLogicDocument();
|
||||
let curPara = doc.GetCurrentParagraph(true);
|
||||
let isRtl = (curPara ? curPara.isRtlDirection() : false);
|
||||
@ -143,6 +152,9 @@
|
||||
}
|
||||
else if (e.KeyCode === 40) // Bottom Arrow
|
||||
{
|
||||
if (_t.editor.editorId !== AscCommon.c_oEditorId.Word)
|
||||
return;
|
||||
|
||||
_t.addStepData('moveCursorDown', [{
|
||||
isAddSelect: e.IsShift(),
|
||||
isWord: e.IsCtrl()
|
||||
|
||||
Reference in New Issue
Block a user