A platform for community discussion. Free, open, simple.
Revert "DEV: Move popups left if application.hbs wrapper is moved by theme" (#11184)
Mark VanLandingham47a91742b047
diff --git a/app/assets/javascripts/discourse/app/components/share-popup.js b/app/assets/javascripts/discourse/app/components/share-popup.jsindex 8fc21f5aba3..b62f08dc2c2 100644--- a/app/assets/javascripts/discourse/app/components/share-popup.js+++ b/app/assets/javascripts/discourse/app/components/share-popup.js@@ -69,10 +69,7 @@ export default Component.extend({}const shareLinkWidth = $this.width();- const pageLeftOffset = document.querySelector(- ".ember-application > .ember-view"- ).offsetLeft;- let x = $currentTargetOffset.left - pageLeftOffset - shareLinkWidth / 2;+ let x = $currentTargetOffset.left - shareLinkWidth / 2;if (x < 25) {x = 25;}diff --git a/app/assets/javascripts/discourse/app/mixins/card-contents-base.js b/app/assets/javascripts/discourse/app/mixins/card-contents-base.jsindex 5e07400d0a8..cccf26db7e3 100644--- a/app/assets/javascripts/discourse/app/mixins/card-contents-base.js+++ b/app/assets/javascripts/discourse/app/mixins/card-contents-base.js@@ -201,10 +201,7 @@ export default Mixin.create({}} else {// The site direction is ltr- const pageLeftOffset = document.querySelector(- ".ember-application > .ember-view"- ).offsetLeft;- position.left += target.width() - pageLeftOffset + 10;+ position.left += target.width() + 10;let overage = $(window).width() - 50 - (position.left + width);if (overage < 0) {