From 8fbc8dbae085f7a75353ba9a2d8a3e00809ffa20 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 26 Aug 2015 17:21:20 -0400 Subject: [PATCH] UX: Fix menu position with custom header --- app/assets/javascripts/discourse/components/menu-panel.js.es6 | 2 +- app/assets/stylesheets/common/base/menu-panel.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/components/menu-panel.js.es6 b/app/assets/javascripts/discourse/components/menu-panel.js.es6 index cc92a49ddae..5bee8ce349f 100644 --- a/app/assets/javascripts/discourse/components/menu-panel.js.es6 +++ b/app/assets/javascripts/discourse/components/menu-panel.js.es6 @@ -16,7 +16,7 @@ export default Ember.Component.extend({ const buttonPanelPos = $buttonPanel.offset(); const myWidth = this.$().width(); - const posTop = parseInt(buttonPanelPos.top + $buttonPanel.height()) - $(window).scrollTop(); + const posTop = parseInt(buttonPanelPos.top + $buttonPanel.height() - $('header.d-header').offset().top); const posLeft = parseInt(buttonPanelPos.left + $buttonPanel.width() - myWidth); return `left: ${posLeft}px; top: ${posTop}px`.htmlSafe(); diff --git a/app/assets/stylesheets/common/base/menu-panel.scss b/app/assets/stylesheets/common/base/menu-panel.scss index 0c8243d0ba7..4a08b338c5c 100644 --- a/app/assets/stylesheets/common/base/menu-panel.scss +++ b/app/assets/stylesheets/common/base/menu-panel.scss @@ -11,7 +11,7 @@ } .menu-panel.drop-down { - position: fixed; + position: absolute; } .menu-panel {