提交 c80b8a33 编写于 作者: D Daniel Imms

Fix wrapping overflow when up against the edge

Fixes #104508
上级 bf5bb7fc
......@@ -141,7 +141,7 @@ export class HoverWidget extends Widget {
// Get horizontal alignment and position
let targetLeft = this._target.x !== undefined ? this._target.x : Math.min(...targetBounds.map(e => e.left));
if (targetLeft + this._hover.containerDomNode.clientWidth >= document.documentElement.clientWidth) {
this._x = document.documentElement.clientWidth;
this._x = document.documentElement.clientWidth - 1;
this._hover.containerDomNode.classList.add('right-aligned');
} else {
this._x = targetLeft;
......
......@@ -18,6 +18,11 @@
color: #3794ff;
}
.monaco-workbench .workbench-hover.right-aligned {
/* The context view service wraps strangely when it's right up against the edge without this */
left: 1px;
}
.monaco-workbench .workbench-hover.right-aligned .hover-row.status-bar .actions {
flex-direction: row-reverse;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册