#84975Add option to BE SplitButton component to right align dropdown items
Description
If a TYPO3\CMS\Backend\Template\Components\Buttons\SplitButton is placed in ButtonBar::BUTTON_POSITION_RIGHT it’s dropdown items could be too long to display and may be cropped.
Bootstrap3 features a class .dropdown-menu-right to right align dropdown itms. See https://getbootstrap.com/docs/3.3/components/#btn-dropdowns-dropup
<div class="btn-group dropup">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span> <span class="sr-only">Toggle Dropdown</span></button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
</ul>
</div>
The relevant part is dropdown-menu-right in <ul class="dropdown-menu dropdown-menu-right">.
Line 165 in SplitButton->render() always returns hardcoded <ul class="dropdown-menu">.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 2
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2021-12-05T15:46:09+00:00" > 12/05/21, 15:46 </span>
-
Benni Mack commented and changed status
NewClosed <span data-processor="relativetime" data-value="2025-03-28T23:31:05+00:00" > 03/28/25, 23:31 </span>Will close this, thanks for the input, Riccardo.
In v13, we work with RTL and semantic alignments now.
On Bootstrap 5 that should be
.dropdown-menu{-sm|-md|-lg|-xl|-xxl}-endsee
https://getbootstrap.com/docs/5.0/components/dropdowns/#menu-alignment
https://getbootstrap.com/docs/5.0/components/dropdowns/#responsive-alignment