Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Drop down in grid #202

Merged
merged 9 commits into from
Sep 25, 2023
8 changes: 7 additions & 1 deletion src/components/Dropdown/DropdownLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ export function DropdownLayout(props: {
useEffect(() => {
let intervalHandle: any;
const handleScroll = _.throttle((event: any) => {
if (elmDropdownPortal && !elmDropdownPortal.contains(event.target) && props.isDropped) {
if (
elmDropdownPortal &&
!elmDropdownPortal.contains(event.target) &&
event.target.tagName !== "INPUT" && // the scroll event is fired in the focused INPUT after clicking the drop icon in firefox. Preventing the dropdown from being shown.
props.isDropped)
{
console.log(event);
props.onDropupRequest?.();
}
}, 100);
Expand Down