mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:11:38 +08:00
Fix RTL topic-admin-menu-position (#5497)
This commit is contained in:
parent
b2b85dc694
commit
4662cc428f
|
@ -63,9 +63,14 @@ createWidget('topic-admin-menu-button', {
|
|||
|
||||
const $button = $(e.target).closest('button');
|
||||
const position = $button.position();
|
||||
const rtl = $('html').hasClass('rtl');
|
||||
position.left = position.left;
|
||||
position.outerHeight = $button.outerHeight();
|
||||
|
||||
if (rtl) {
|
||||
position.left -= 217 - $button.outerWidth();
|
||||
}
|
||||
|
||||
if (this.attrs.fixed) {
|
||||
position.left += $button.width() - 203;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
// *** These styles are all going to be flipped by the r2 gem ***
|
||||
// Adding the !important declaration to a rule prevents it from being flipped.
|
||||
|
||||
// Keep the topic admin menu on the page
|
||||
.rtl .popup-menu {
|
||||
right: 0 !important;
|
||||
.rtl #topic-progress-wrapper .topic-admin-popup-menu.right-side,
|
||||
.rtl #topic-progress-wrapper.docked .topic-admin-popup-menu.right-side {
|
||||
right: 80px;
|
||||
}
|
||||
|
||||
// This is used to flip the .d-icon-caret-right
|
||||
|
|
Loading…
Reference in New Issue
Block a user