Skip to content

fix(Dropdown): mirror the menu placement in a right-to-left context - #299

Merged
xidedix merged 1 commit into
v5.7from
fix/dropdown-rtl-placement
Oct 14, 2026
Merged

xidedix merged 1 commit into
v5.7from
fix/dropdown-rtl-placement

Conversation

@xidedix

@xidedix xidedix commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

On RTL pages the dropdown menu opened at bottom-start, a physical left edge, so a dropdown, DatePicker or TimePicker hung off the wrong side of its toggle, and dropstart opened on the left although the docs say directions are mirrored.

A placement set on c-dropdown is now used as given. Without it the placement follows direction and the alignment option (the menu's own, else the dropdown's) and mirrors when the dropdown sits in an RTL context: bottom-end by default, dropstart on the right, dropend on the left, dropup and end alignment swapped. A placement passed in popperOptions is still ignored.

Changes in LTR too: an explicit placement now wins over direction and alignment (before, both overrode it); dropup with alignment end opens at top-end instead of downward; dropend, dropstart and centered directions keep their side with alignment end; alignment end set on cDropdownMenu now moves the menu, not only its class.

The placement input has no default any more, its type is Placement | undefined; the effective default is bottom-start, bottom-end for rtl.

Measured in Chromium on local docs with a pro build, LTR and RTL: dropdown, dropstart, dropend, dropup, end alignment, split button, DatePicker, TimePicker, Autocomplete. RTL menus align to the start edge of the toggle and side directions swap.

On RTL pages the menu opened at bottom-start, a physical left edge, so a
dropdown, DatePicker or TimePicker hung off the wrong side of its toggle and
dropstart opened on the left. A placement set on c-dropdown is used as given;
without it the placement follows direction and the alignment option (the
menu's, else the dropdown's) and mirrors in RTL. Dropup with alignment end
opens at top-end; side and centered directions keep their side. The
placement input has no default; its type is Placement | undefined.
@xidedix
xidedix merged commit 4a156ad into v5.7 Oct 14, 2026
9 checks passed
@xidedix
xidedix deleted the fix/dropdown-rtl-placement branch October 14, 2026 20:38
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.

1 participant