diff --git a/extend.php b/extend.php index 739e8ba..c4b4ad8 100644 --- a/extend.php +++ b/extend.php @@ -12,9 +12,16 @@ namespace ACPL\MobileTab; use Flarum\Extend; +use Flarum\Frontend\Document; return [ (new Extend\Frontend('forum'))->js(__DIR__.'/js/dist/forum.js')->css(__DIR__.'/less/forum.less'), new Extend\Locales(__DIR__.'/locale'), + + (new Extend\Frontend('forum')) + ->content(function (Document $document) { + $document->meta['viewport'] = "{$document->meta['viewport']}, viewport-fit=cover"; + }), + ]; diff --git a/less/forum.less b/less/forum.less index fe14d2a..471fd0b 100644 --- a/less/forum.less +++ b/less/forum.less @@ -15,7 +15,7 @@ bottom: 0; left: 0; width: 100%; - height: var(--mobile-tab-height); + height: ~"calc(var(--mobile-tab-height) + env(safe-area-inset-bottom, 0))"; background: var(--mobile-tab-bg); box-shadow: var(--mobile-tab-shadow); z-index: var(--mobile-tab-zindex);