Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 044dbdc

Browse files
committed
fix(select): fix menu positioning inside fixed elements
references #3218
1 parent ddfe523 commit 044dbdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/menu/menu-interim-element.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ function MenuProvider($$interimElementProvider) {
271271

272272
var bounds = {
273273
left: boundryNodeRect.left + MENU_EDGE_MARGIN,
274-
top: boundryNodeRect.top + MENU_EDGE_MARGIN,
275-
bottom: boundryNodeRect.bottom - MENU_EDGE_MARGIN,
274+
top: Math.max(boundryNodeRect.top, 0) + MENU_EDGE_MARGIN,
275+
bottom: Math.max(boundryNodeRect.bottom, Math.max(boundryNodeRect.top, 0) + boundryNodeRect.height) - MENU_EDGE_MARGIN,
276276
right: boundryNodeRect.right - MENU_EDGE_MARGIN
277277
};
278278

0 commit comments

Comments
 (0)