Skip to content

Conversation

@aseemxs
Copy link
Contributor

@aseemxs aseemxs commented Dec 3, 2025

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

The model selection dropdown in Amazon Q chat was getting cut off at the bottom, showing only 2-3 out of 4 available models. This was caused by overflow clipping in
the JCEF webview environment.

Solution:
Implemented a custom dropdown that replaces native elements with direct fixed positioning. This approach avoids the modal overlay used in #6120 for better performance and simpler code

Key changes:

  • Custom dropdown with position: fixed and high z-index to escape overflow clipping
  • Smart positioning (opens above or below trigger based on available space)
  • Consistent 11px font size for trigger and dropdown options
  • Reduced padding for balanced visual appearance
  • Generic fallback (empty string) instead of hardcoded "Select model" text
  • Applies to all select.mynah-form-input elements, not just model dropdown

Supersedes #6120 - removed modal overlay approach in favor of direct positioning.

Checklist

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@aseemxs aseemxs changed the title Fix/dropdown no overlay fix(amazonq): add custom modal dropdown for model selection Dec 3, 2025
@aseemxs aseemxs marked this pull request as ready for review December 3, 2025 00:32
aseemxs and others added 2 commits December 8, 2025 11:28
Removed all console.log statements from custom dropdown code as they are not needed in production.
@aseemxs aseemxs closed this Dec 8, 2025
@aseemxs aseemxs reopened this Dec 8, 2025
@aseemxs aseemxs merged commit 5cc32e9 into aws:main Dec 9, 2025
14 of 15 checks passed
@aseemxs aseemxs deleted the fix/dropdown-no-overlay branch December 9, 2025 00:17
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.

3 participants