mirror of
https://github.com/discourse/discourse.git
synced 2025-04-02 03:25:53 +08:00
check for direction
This commit is contained in:
parent
7f4ca91e06
commit
712b2cc435
@ -11,7 +11,9 @@ export default Ember.Component.extend({
|
||||
const $parent = this.$().closest('.d-editor');
|
||||
const w = $parent.width();
|
||||
const h = $parent.height();
|
||||
$modal.css({ left: (w / 2) - ($modal.outerWidth() / 2) });
|
||||
const dir = $('html').css('direction') === 'rtl' ? 'right' : 'left';
|
||||
const offset = (w / 2) - ($modal.outerWidth() / 2);
|
||||
$modal.css(dir, offset + 'px');
|
||||
parent.$('.d-editor-overlay').removeClass('hidden').css({ width: w, height: h});
|
||||
this.$('input').focus();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user