Fix issue calculating flyout position [SCI-10367]

This commit is contained in:
wandji20 2024-03-19 11:26:35 +01:00
parent 3df70bdaf3
commit 4e767155bc

View file

@ -64,7 +64,7 @@ export default {
flyout.style.minWidth = `${width}px`;
}
if (window.innerWidth - flyoutRect.right < 0) { // when flyout is out of screen
if (window.innerWidth - (field.x + flyoutRect.width) < 0) { // when flyout is out of screen
flyout.style.left = 'unset';
flyout.style.right = `${width - Math.abs(right)}px`;
} else if (this.position === 'right') {