Skip to content

Commit

Permalink
Fine-tuned the viewportStickyNorth position.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Aug 4, 2023
1 parent c14d3f1 commit 2d19f70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1155,8 +1155,9 @@ export function generatePositions( options: {
return null;
}

// The target must go beyond at least one of the viewport's edges for this position to make sense.
if ( targetRect.top > boundaryRect.top && targetRect.bottom < boundaryRect.bottom ) {
// Engage when the target top and bottom edges are close or off the boundary.
// By close, it means there's not enough space for the balloon arrow (offset).
if ( boundaryRect.height - targetRect.height > stickyVerticalOffset ) {
return null;
}

Expand Down

0 comments on commit 2d19f70

Please sign in to comment.