UX: Topic progress bar should not flash on desktop

Followup on 78725f50

This makes the change a bit safer in case .d-header is not to be found due
to a customization.
This commit is contained in:
Sam Saffron 2020-02-05 15:36:39 +11:00
parent 78725f5081
commit 15b27f28aa

View File

@ -42,8 +42,8 @@ export default Component.extend(PanEvents, {
timelineContainer = document.querySelectorAll(
".timeline-container"
)[0],
headerHeight =
document.querySelectorAll(".d-header")[0].offsetHeight || 0;
headerContainer = document.querySelectorAll(".d-header")[0],
headerHeight = (headerContainer && headerContainer.offsetHeight) || 0;
if (timelineContainer && composer) {
renderTimeline =
@ -61,7 +61,7 @@ export default Component.extend(PanEvents, {
},
_checkSize() {
debounce(this, this._performCheckSize, 300);
debounce(this, this._performCheckSize, 300, true);
},
// we need to store this so topic progress has something to init with