the browser-facing portion of osu!

getBoundingClientRect().height is 0 when navigating via history on first render

bakaneko 64e4fa5b 459ef4ad

+9 -4
+5 -2
resources/js/beatmap-discussions/new-discussion.tsx
··· 137 } 138 139 componentDidMount() { 140 - this.updateStickToHeight(); 141 // watching for height changes on the stickTo element to handle horizontal scrollbars when they appear. 142 $(window).on('resize', this.updateStickToHeight); 143 - this.disposers.add(core.reactTurbolinks.runAfterPageLoad(action(() => this.mounted = true))); 144 if (this.props.autoFocus) { 145 this.disposers.add(core.reactTurbolinks.runAfterPageLoad(() => this.inputBox.current?.focus())); 146 }
··· 137 } 138 139 componentDidMount() { 140 // watching for height changes on the stickTo element to handle horizontal scrollbars when they appear. 141 $(window).on('resize', this.updateStickToHeight); 142 + this.disposers.add(core.reactTurbolinks.runAfterPageLoad(action(() => { 143 + this.mounted = true; 144 + this.updateStickToHeight(); 145 + }))); 146 + 147 if (this.props.autoFocus) { 148 this.disposers.add(core.reactTurbolinks.runAfterPageLoad(() => this.inputBox.current?.focus())); 149 }
+4 -2
resources/js/beatmap-discussions/new-review.tsx
··· 56 } 57 58 componentDidMount(): void { 59 - this.updateStickToHeight(); 60 // watching for height changes on the stickTo element to handle horizontal scrollbars when they appear. 61 $(window).on('resize', this.updateStickToHeight); 62 - this.disposers.add(core.reactTurbolinks.runAfterPageLoad(action(() => this.mounted = true))); 63 } 64 65 componentWillUnmount(): void {
··· 56 } 57 58 componentDidMount(): void { 59 // watching for height changes on the stickTo element to handle horizontal scrollbars when they appear. 60 $(window).on('resize', this.updateStickToHeight); 61 + this.disposers.add(core.reactTurbolinks.runAfterPageLoad(action(() => { 62 + this.mounted = true; 63 + this.updateStickToHeight(); 64 + }))); 65 } 66 67 componentWillUnmount(): void {