mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 12:33:35 +01:00
Handle input on Android
Fixes microsoft/vscode#107524 Fixes microsoft/monaco-editor#48 Fixes microsoft/monaco-editor#528 Fixes microsoft/monaco-editor#562 Fixes microsoft/monaco-editor#563 Fixes microsoft/monaco-editor#1538 Fixes microsoft/monaco-editor#2261 Refs microsoft/vscode#107602
This commit is contained in:
@@ -37,7 +37,7 @@ export interface IMouseDispatchData {
|
||||
export interface ICommandDelegate {
|
||||
paste(text: string, pasteOnNewLine: boolean, multicursorText: string[] | null, mode: string | null): void;
|
||||
type(text: string): void;
|
||||
replacePreviousChar(text: string, replaceCharCnt: number): void;
|
||||
compositionType(text: string, replacePrevCharCnt: number, replaceNextCharCnt: number, positionDelta: number): void;
|
||||
startComposition(): void;
|
||||
endComposition(): void;
|
||||
cut(): void;
|
||||
@@ -70,8 +70,8 @@ export class ViewController {
|
||||
this.commandDelegate.type(text);
|
||||
}
|
||||
|
||||
public replacePreviousChar(text: string, replaceCharCnt: number): void {
|
||||
this.commandDelegate.replacePreviousChar(text, replaceCharCnt);
|
||||
public compositionType(text: string, replacePrevCharCnt: number, replaceNextCharCnt: number, positionDelta: number): void {
|
||||
this.commandDelegate.compositionType(text, replacePrevCharCnt, replaceNextCharCnt, positionDelta);
|
||||
}
|
||||
|
||||
public compositionStart(): void {
|
||||
|
||||
@@ -239,6 +239,10 @@ export class View extends ViewEventHandler {
|
||||
this.focus();
|
||||
},
|
||||
|
||||
dispatchTextAreaEvent: (event: CustomEvent) => {
|
||||
this._textAreaHandler.textArea.domNode.dispatchEvent(event);
|
||||
},
|
||||
|
||||
getLastRenderData: (): PointerHandlerLastRenderData => {
|
||||
const lastViewCursorsRenderData = this._viewCursors.getLastRenderData() || [];
|
||||
const lastTextareaPosition = this._textAreaHandler.getLastRenderData();
|
||||
|
||||
Reference in New Issue
Block a user