Skip to content

fix(ui): remove getPopupContainer to prevent double scrollbar in drop…#38659

Open
jaymasiwal wants to merge 1 commit intoapache:masterfrom
jaymasiwal:fix-double-scrollbar
Open

fix(ui): remove getPopupContainer to prevent double scrollbar in drop…#38659
jaymasiwal wants to merge 1 commit intoapache:masterfrom
jaymasiwal:fix-double-scrollbar

Conversation

@jaymasiwal
Copy link
Contributor

@jaymasiwal jaymasiwal commented Mar 15, 2026

User description

SUMMARY

Fixes the dual scrollbar issue in dropdown menus by removing custom getPopupContainer overrides that forced dropdowns to render inside constrained parent containers.

Allowing Ant Design to render dropdowns in document.body (default behavior) prevents nested scroll containers and resolves the double scrollbar problem.

TESTING INSTRUCTIONS

  1. Start Superset locally
  2. Navigate to Database configuration modal
  3. Open dropdown fields with long option lists
  4. Verify only a single scrollbar appears in the dropdown menu.

ADDITIONAL INFORMATION

Fixes #35833


CodeAnt-AI Description

Prevent double scrollbar in dropdowns by rendering menus in document body

What Changed

  • Dropdown menus now render into the document body instead of constrained parent containers, avoiding nested scrollbars
  • Removed custom container override in the database configuration modal so long option lists show a single scrollbar
  • Loading and "not found" behaviors remain unchanged while dropdown overflow is fixed

Impact

✅ Fewer double scrollbars in dropdowns
✅ Clearer dropdown lists in modals with long option sets
✅ More consistent dropdown positioning across the app

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Mar 15, 2026

Code Review Agent Run #d6e16a

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/src/features/databases/DatabaseModal/index.tsx - 1
    • Modal dropdown positioning risk · Line 1160-1162
      The Select component inside the DatabaseModal previously used getPopupContainer to render the dropdown in the appropriate container, avoiding potential z-index or clipping issues with the modal. Removing it might cause the dropdown to be improperly positioned or hidden. Based on common Ant Design patterns for modals, restoring this prop would help maintain reliable UI behavior.
      Code suggestion
       @@ -1160,2 +1160,4 @@
      -        
      -        dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
      +        getPopupContainer={triggerNode =>
      +          triggerNode.parentElement || document.body
      +        }
      +        dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
Review Details
  • Files reviewed - 2 · Commit Range: 8e741c3..8e741c3
    • superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx
    • superset-frontend/src/features/databases/DatabaseModal/index.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot bot added the change:frontend Requires changing the frontend label Mar 15, 2026
@codeant-ai-for-open-source codeant-ai-for-open-source bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Mar 15, 2026
@codeant-ai-for-open-source
Copy link
Contributor

Sequence Diagram

This PR removes custom popup container overrides so dropdown menus no longer render inside constrained modal parents. The select component now defaults to rendering in the document body, which avoids nested scrolling and eliminates double scrollbars.

sequenceDiagram
    participant User
    participant DatabaseModal
    participant Select
    participant AntDesign
    participant DocumentBody

    User->>DatabaseModal: Open dropdown in database modal
    DatabaseModal->>Select: Render select without popup container override
    Select->>AntDesign: Resolve popup container to default
    AntDesign->>DocumentBody: Render dropdown menu in document body
    DocumentBody-->>User: Display dropdown with single scrollbar
Loading

Generated by CodeAnt AI

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

Labels

change:frontend Requires changing the frontend packages size/XS size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dropdown menu shows 2 scroll bars.

1 participant