提交 97331424 编写于 作者: R Ramya Achutha Rao

Widget offset is relative to editor in standalone editor

上级 8f5ca20e
......@@ -947,8 +947,9 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
const editorCoords = getDomNodePagePosition(this.editor.getDomNode());
const cursorX = editorCoords.left + cursorCoords.left;
const cursorY = editorCoords.top + cursorCoords.top + cursorCoords.height;
const widgetX = this.element.offsetLeft;
const widgetY = this.element.offsetTop;
const widgetCoords = getDomNodePagePosition(this.element);
const widgetX = widgetCoords.left;
const widgetY = widgetCoords.top;
if (widgetX < cursorX - this.listWidth) {
// Widget is too far to the left of cursor, swap list and docs
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册