mirror of
https://github.com/discourse/discourse.git
synced 2025-03-26 09:45:35 +08:00
FIX: optimizes sk body position in RTL mode (#10997)
This commit is contained in:
parent
85f827ee1c
commit
281bf0b345
@ -32,6 +32,12 @@ const SELECT_KIT_OPTIONS = Mixin.create({
|
||||
selectKitOptions: EMPTY_OBJECT,
|
||||
});
|
||||
|
||||
function isDocumentRTL() {
|
||||
return (
|
||||
window.getComputedStyle(document.querySelector("html")).direction === "rtl"
|
||||
);
|
||||
}
|
||||
|
||||
export default Component.extend(
|
||||
SELECT_KIT_OPTIONS,
|
||||
PluginApiMixin,
|
||||
@ -268,7 +274,7 @@ export default Component.extend(
|
||||
clearOnClick: false,
|
||||
closeOnChange: true,
|
||||
limitMatches: null,
|
||||
placement: "bottom-start",
|
||||
placement: isDocumentRTL() ? "bottom-end" : "bottom-start",
|
||||
placementStrategy: null,
|
||||
filterComponent: "select-kit/select-kit-filter",
|
||||
selectedNameComponent: "selected-name",
|
||||
|
@ -8,7 +8,6 @@ export default Component.extend({
|
||||
classNameBindings: ["isLoading"],
|
||||
appendReason: true,
|
||||
showFullTitle: true,
|
||||
placement: "bottom-start",
|
||||
notificationLevel: null,
|
||||
topic: null,
|
||||
showCaret: true,
|
||||
|
@ -7,7 +7,6 @@
|
||||
options=(hash
|
||||
icon=icon
|
||||
showFullTitle=showFullTitle
|
||||
placement=placement
|
||||
preventsClickPropagation=true
|
||||
showCaret=showCaret
|
||||
)
|
||||
@ -22,7 +21,6 @@
|
||||
options=(hash
|
||||
icon=icon
|
||||
showFullTitle=showFullTitle
|
||||
placement=placement
|
||||
preventsClickPropagation=true
|
||||
showCaret=showCaret
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user