1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Fix mobile PostStream top scroll adjustment & remove App:before (#2385)

- remove App:before so we can use #app-navigation to access the mobile header
- fix mobile postStream scroll top margin adjustment
This commit is contained in:
Wadim Kalmykov
2020-11-15 05:21:38 +07:00
committed by GitHub
parent 10e356e1b2
commit 3d597f9fab
2 changed files with 22 additions and 26 deletions

View File

@@ -287,7 +287,9 @@ export default class PostStream extends Component {
* @return {Integer}
*/
getMarginTop() {
return this.$() && $('#header').outerHeight() + parseInt(this.$().css('margin-top'), 10);
const headerId = app.screen() === 'phone' ? '#app-navigation' : '#header';
return this.$() && $(headerId).outerHeight() + parseInt(this.$().css('margin-top'), 10);
}
/**