From a71e371877f2fe113461887409933360e6470d46 Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Mon, 30 May 2022 17:03:05 +0300 Subject: [PATCH] RolePicker: Add extra offset for menu position (#49823) --- public/app/core/components/RolePicker/RolePicker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/core/components/RolePicker/RolePicker.tsx b/public/app/core/components/RolePicker/RolePicker.tsx index d2fdba81cfc..439ddec4f8e 100644 --- a/public/app/core/components/RolePicker/RolePicker.tsx +++ b/public/app/core/components/RolePicker/RolePicker.tsx @@ -53,7 +53,7 @@ export const RolePicker = ({ const { bottom, top } = dimensions; const distance = window.innerHeight - bottom; const offset = bottom - top + 10; // Add extra 10px to offset to account for border and outline - if (distance < MENU_MAX_HEIGHT) { + if (distance < MENU_MAX_HEIGHT + 20) { setOffset(offset); } else { setOffset(-offset);