DEV: Move popups left if application.hbs wrapper is moved by theme
We have a div that is inside #main because of the history of Ember explained here. Once we have Ember cli, we can use optional feature flags and disable creating this div with application-template-wrapper: false, and refactor this code and any plugins that rely on that div being present (some plugin regarding remote collaboration??).
This commit is contained in:
parent
0863c36221
commit
95c871be3e
|
@ -69,7 +69,10 @@ export default Component.extend({
|
|||
}
|
||||
|
||||
const shareLinkWidth = $this.width();
|
||||
let x = $currentTargetOffset.left - shareLinkWidth / 2;
|
||||
const pageLeftOffset = document.querySelector(
|
||||
".ember-application > .ember-view"
|
||||
).offsetLeft;
|
||||
let x = $currentTargetOffset.left - pageLeftOffset - shareLinkWidth / 2;
|
||||
if (x < 25) {
|
||||
x = 25;
|
||||
}
|
||||
|
|
|
@ -201,7 +201,10 @@ export default Mixin.create({
|
|||
}
|
||||
} else {
|
||||
// The site direction is ltr
|
||||
position.left += target.width() + 10;
|
||||
const pageLeftOffset = document.querySelector(
|
||||
".ember-application > .ember-view"
|
||||
).offsetLeft;
|
||||
position.left += target.width() - pageLeftOffset + 10;
|
||||
|
||||
let overage = $(window).width() - 50 - (position.left + width);
|
||||
if (overage < 0) {
|
||||
|
|
Loading…
Reference in New Issue