Skip to content

Commit d6052bb

Browse files
sbattenjoaomoreno
authored andcommitted
1 parent 7c57aaa commit d6052bb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/vs/base/browser/ui/contextview/contextview.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ export class ContextView extends Disposable {
242242
// if view intersects vertically with anchor, shift it horizontally
243243
if (Range.intersects({ start: top, end: top + viewSizeHeight }, { start: verticalAnchor.offset, end: verticalAnchor.offset + verticalAnchor.size })) {
244244
horizontalAnchor.size = around.width;
245+
if (anchorAlignment === AnchorAlignment.RIGHT) {
246+
horizontalAnchor.offset = around.left;
247+
}
245248
}
246249

247250
const left = layout(window.innerWidth, viewSizeWidth, horizontalAnchor);

0 commit comments

Comments
 (0)