flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.24k stars 828 forks source link

[2.x] Use dynamic viewport units for height of Modals #3951

Open DavideIadeluca opened 6 months ago

DavideIadeluca commented 6 months ago

Fixes #3950

Changes proposed in this pull request: This change addresses an issue where the height and position of Modals on mobile is inconsistent. I propose to use dynamic viewport units which take UI elements of the browser/device into consideration and adjusts the height accordingly.

Reviewers should focus on: Since nearly every browser on a reasonable version supports dynamic viewport units, I'm not sure if it makes sense to include the fallback everywhere. Maybe it would make more sense to automatically add fallback values when the CSS is complied?

Screenshot

https://github.com/flarum/framework/assets/146922689/2d276ef7-e433-48ee-b9fd-34b7fa99971d

QA Necessity

Confirmed

Required changes:

nodeloc commented 6 months ago

Hi, @DavideIadeluca I modified the file but the issue haven't resolved. My iOS version is 17.1.2.

DavideIadeluca commented 6 months ago

Further discussion on this topic tracked in https://discuss.flarum.org/d/33930-the-modal-always-displays-incompletely-with-the-header-being-blocked/11