提交 ead79a87 编写于 作者: A Alex Dima

Fixes #9736: Position textarea at the selection start instead of the cursor position

上级 b6310c7c
......@@ -127,21 +127,9 @@ export class TextAreaHandler extends Disposable {
}
}
let showAtLineNumber: number;
let showAtColumn: number;
// In IE we cannot set .value when handling 'compositionstart' because the entire composition will get canceled.
if (this.Browser.isEdgeOrIE) {
// Ensure selection start is in viewport
showAtLineNumber = this.selection.startLineNumber;
showAtColumn = (this.selection.startColumn - this.textAreaState.getSelectionStart());
} else {
showAtLineNumber = this.cursorPosition.lineNumber;
showAtColumn = this.cursorPosition.column;
}
this._onCompositionStart.fire({
showAtLineNumber: showAtLineNumber,
showAtColumn: showAtColumn
showAtLineNumber: this.selection.startLineNumber,
showAtColumn: this.selection.startColumn
});
}));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册