mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
FIX: Better height estimation / observing for menu panels
This commit is contained in:
parent
d61cfbe2aa
commit
63f0247d21
2 changed files with 2 additions and 3 deletions
|
@ -43,7 +43,6 @@ export default Ember.Component.extend({
|
|||
$panelBody.height(contentHeight);
|
||||
$('body').addClass('drop-down-visible');
|
||||
} else {
|
||||
|
||||
const menuTop = headerHeight();
|
||||
|
||||
let height;
|
||||
|
@ -127,7 +126,7 @@ export default Ember.Component.extend({
|
|||
_watchSizeChanges() {
|
||||
if (mutationSupport) {
|
||||
this._observer.disconnect();
|
||||
this._observer.observe(this.element, { childList: true, subtree: true });
|
||||
this._observer.observe(this.element, { childList: true, subtree: true, attributes: true });
|
||||
} else {
|
||||
clearInterval(this._resizeInterval);
|
||||
this._resizeInterval = setInterval(() => {
|
||||
|
|
|
@ -45,7 +45,7 @@ export default Ember.Component.extend({
|
|||
if (this.get('loadingNotifications')) { return; }
|
||||
|
||||
// estimate (poorly) the amount of notifications to return
|
||||
var limit = Math.round(($(window).height() - headerHeight()) / 50);
|
||||
var limit = Math.round(($(window).height() - headerHeight()) / 55);
|
||||
// we REALLY don't want to be asking for negative counts of notifications
|
||||
// less than 5 is also not that useful
|
||||
if (limit < 5) { limit = 5; }
|
||||
|
|
Loading…
Reference in a new issue