mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 05:29:30 +08:00
UX: Fix menu position with custom header
This commit is contained in:
parent
a659fe3cc3
commit
8fbc8dbae0
|
@ -16,7 +16,7 @@ export default Ember.Component.extend({
|
||||||
const buttonPanelPos = $buttonPanel.offset();
|
const buttonPanelPos = $buttonPanel.offset();
|
||||||
const myWidth = this.$().width();
|
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);
|
const posLeft = parseInt(buttonPanelPos.left + $buttonPanel.width() - myWidth);
|
||||||
|
|
||||||
return `left: ${posLeft}px; top: ${posTop}px`.htmlSafe();
|
return `left: ${posLeft}px; top: ${posTop}px`.htmlSafe();
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-panel.drop-down {
|
.menu-panel.drop-down {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-panel {
|
.menu-panel {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user