Skip to content

Commit

Permalink
Add change data and apiName to ContentChangedEvent when handle keyboa…
Browse files Browse the repository at this point in the history
…rd input (#2854)
  • Loading branch information
JiuqingSong authored Nov 1, 2024
1 parent 5991526 commit fad8ec6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export function keyboardEnter(
rawEvent,
scrollCaretIntoView: true,
changeSource: ChangeSource.Keyboard,
getChangeData: () => rawEvent.which,
apiName: 'handleEnterKey',
}
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export function keyboardInput(editor: IEditor, rawEvent: KeyboardEvent) {
scrollCaretIntoView: true,
rawEvent,
changeSource: ChangeSource.Keyboard,
getChangeData: () => rawEvent.which,
apiName: 'handleInputKey',
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export function keyboardTab(editor: IEditor, rawEvent: KeyboardEvent) {
},
{
apiName: 'handleTabKey',
rawEvent,
changeSource: ChangeSource.Keyboard,
getChangeData: () => rawEvent.which,
}
);

Expand All @@ -41,7 +44,9 @@ export function keyboardTab(editor: IEditor, rawEvent: KeyboardEvent) {
},
{
apiName: 'handleTabKey',
rawEvent,
changeSource: ChangeSource.Keyboard,
getChangeData: () => rawEvent.which,
}
);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1817,7 +1817,7 @@ describe('handleEnterOnList - keyboardEnter', () => {
let editor: any;

editingTestCommon(
undefined,
'handleEnterKey',
newEditor => {
editor = newEditor;

Expand Down

0 comments on commit fad8ec6

Please sign in to comment.