mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 22:53:43 +08:00
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:
parent
78725f5081
commit
15b27f28aa
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user