-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropdown toggle caret doesn't respect left/right direction #1863
Comments
Is it working if using |
By using
|
Thanks for investigating! I wasn't aware that it's also used with Popper. Do you know how that misalignment on namings is solved in Bootstrap itself? |
Relevant snippets taken from https://github.com/twbs/bootstrap/blob/cbc4e3a4098506315c32346b194e9e1a4d7db091/js/src/dropdown.js // Line 50
const CLASS_NAME_DROPEND = 'dropend'
const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'
// Line 248
_getPlacement() {
const parentDropdown = this._parent
if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
return PLACEMENT_RIGHT
}
if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
return PLACEMENT_LEFT
}
...
}
// Line 295
_getPopperConfig() {
const defaultBsPopperConfig = {
placement: this._getPlacement(),
...
}
...
} |
Thanks a lot for looking up that information! I feel we should do the following:
PR for the short-term fix listed as first step is very welcome. Do you have time working on it? I would like giving @simonihmig the chance to raid concerns with second step, the remaining of argument values, before picking it up. |
Yeah, I wouldn't mind doing 2., if anyone has the time for that!? 🙃 |
The caret in the dropdown toggle is shown pointing downward also when the
@direction
isleft
orright
. The class being added results indropleft
, resp.dropright
. Whereas, for BS5 they should bedropstart
, resp.dropend
(they respect RTL).ember-bootstrap/addon/components/bs-dropdown.js
Line 242 in 4ec513d
ember-bootstrap/addon/components/bs-dropdown.js
Line 244 in 4ec513d
The text was updated successfully, but these errors were encountered: