Fix RTL topic-admin-menu-position (#5497)

This commit is contained in:
Simon Cossar 2018-01-28 23:14:36 -08:00 committed by Sam
parent b2b85dc694
commit 4662cc428f
2 changed files with 8 additions and 3 deletions

View File

@ -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;
}

View File

@ -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