Skip to content

Fix dropdown scroll by restoring scroll container nesting order#18239

Merged
FelixMalfait merged 1 commit intomainfrom
fix-dropdown-scroll
Feb 25, 2026
Merged

Fix dropdown scroll by restoring scroll container nesting order#18239
FelixMalfait merged 1 commit intomainfrom
fix-dropdown-scroll

Conversation

@ehconitin
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@FelixMalfait FelixMalfait merged commit 50be974 into main Feb 25, 2026
49 of 55 checks passed
@FelixMalfait FelixMalfait deleted the fix-dropdown-scroll branch February 25, 2026 18:55
@twenty-eng-sync
Copy link
Copy Markdown

Hey @ehconitin! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

@github-actions
Copy link
Copy Markdown
Contributor

Thanks @ehconitin for your contribution!
This marks your 324th PR on the repo. You're top 1% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 25, 2026

Greptile Summary

This PR fixes dropdown scroll behavior by reversing the nesting order of the scroll container and padding container. Previously, the padding was applied outside the scrollable area, which caused scroll calculation issues. Now the scrollable container is outermost, with padding applied inside.

  • Swapped StyledScrollableContainer and StyledExternalContainer nesting in scrollable mode
  • Moved role="listbox" attribute from outer to inner container (may affect accessibility)
  • Padding now scrolls with content instead of being fixed outside scroll area

Confidence Score: 4/5

  • This PR is safe to merge with one accessibility consideration to verify
  • The change is a simple DOM nesting swap that fixes scroll behavior. However, moving the ARIA role="listbox" attribute from the scrollable container to an inner element may affect screen readers and should be tested for accessibility compliance.
  • Verify DropdownMenuItemsContainer.tsx works correctly with screen readers after the role="listbox" attribute change

Important Files Changed

Filename Overview
packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx Swapped nesting order of scroll and padding containers to fix scroll behavior; accessibility attribute role="listbox" moved to inner container

Last reviewed commit: 8e91c87

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

hasMaxHeight ? DROPDOWN_MENU_ITEMS_CONTAINER_MAX_HEIGHT : undefined
}
>
<StyledExternalContainer role="listbox">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moving role="listbox" inside the scrollable container may affect accessibility tools that expect the scrollable element itself to have this ARIA role

Suggested change
<StyledExternalContainer role="listbox">
<StyledScrollableContainer
role="listbox"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants