Skip to content

Commit

Permalink
Fix #2633 scrollCaretIntoView causes unexpected scroll (#2634)
Browse files Browse the repository at this point in the history
* Fix #2633

* add comment
  • Loading branch information
JiuqingSong committed May 15, 2024
1 parent 1822d18 commit 4bd6cf7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function mergePasteContent(
{
changeSource: ChangeSource.Paste,
getChangeData: () => clipboardData,
scrollCaretIntoView: true,
scrollCaretIntoView: false, // TODO #2633: Make a full fix to the scroll behavior
apiName: 'paste',
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function keyboardDelete(editor: IEditor, rawEvent: KeyboardEvent) {
rawEvent,
changeSource: ChangeSource.Keyboard,
getChangeData: () => rawEvent.which,
scrollCaretIntoView: true,
scrollCaretIntoView: false, // TODO #2633: Make a full fix to the scroll behavior
apiName: rawEvent.key == 'Delete' ? 'handleDeleteKey' : 'handleBackspaceKey',
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function keyboardInput(editor: IEditor, rawEvent: KeyboardEvent) {
}
},
{
scrollCaretIntoView: true,
scrollCaretIntoView: false, // TODO #2633: Make a full fix to the scroll behavior
rawEvent,
}
);
Expand Down

0 comments on commit 4bd6cf7

Please sign in to comment.