Lightbox display on mobile phones

Permalink Browser Info Environment
I still have a problem with the lightbox display on mobile devices.
Everything looks ok in the preview, but on the real device the lightbox is much too deep and too long. How to improve this?

https://c5.stelze.at/de-at/produkte/absperrsysteme/barrikaden/grunde...

3 Attachments

Type: Discussion
Status: Resolved
strandbein
View Replies:
JohntheFish replied on at Permalink Reply
JohntheFish
I had a look at your referenced page on my mobile and it looks like the overall lightbox height to fill the window on my phone is about 3x bigger than it should be.

Omni doesn't have anything to do with the lightbox height, that is determined completely by the magnific script. It could be a problem in the magnific script itself, perhaps not allowing for the device pixel ratio. The magnific page on Github has quite a few open issues when I search for 'height' and 'mobile'. Sometimes this kind of problem can be traced back to a theme not providing headers for such, but I doubt if that is the case in your particular situation because everything else seems to be good on a mobile. I suspect this stems from magnific.js being quite an old script that pre-dated retina devices and high pixel ratios.

You may be able to fix this with some CSS to override the magnific.js CSS, perhaps by using vh and vw units instead of % units to size the overlay and background. But that in turn could have unintended consequences.

For the longer term,I have been considering a couple of enhancements to Omni Gallery:
a) Provide a general option to disable lightbox on mobile, like I have for MT to disable transitions on mobile.
b) Provide additional overlay plugins such as bootstrap overlay, so there are alternatives for situations where magnific is not compatible.
strandbein replied on at Permalink Reply 2 Attachments
strandbein
Ok, I just don't understand why it works in the simulator and not on the real devices.
In this context, another question: On iPad, the full-screen display in FireFox is ok, but in Safari and Chrome the lightbox is only displayed in the area of the container it contains. What could be the reason for this?
JohntheFish replied on at Permalink Reply
JohntheFish
I suspect the difference is because the simulator has a 1:1 pixel ratio. Many mobile displays have 2:1, 2.75:1 and 3:1 pixel ratios.

Desktop browsers all grow from a limited and stable code base - chrome, firefox, webkit; benefit from a resizable window within the screen, less restraint on code size, and generally auto-update,

Mobile browsers have a more variable code base, are 'optimised' to full screen on their devices, and are often stuck in versions from the dark ages because they do not auto update. Hence it is possible that for some devices/browsers the more recent CSS is either not supported or is implemented in a very device specific and non-standard way.

As an aside, mobile devices also get stuck in arguments between a touch/swipe based element within a browser window and the overall touch/swipe scrolling and navigation of the device itself.

In many mobile situations a full screen modal overlay can become a superfluous nuisance because a gallery or carousel is already set for just 1 image across the screen. I will move the option to disable lightbox on mobile devices up in my list of things to do.
strandbein replied on at Permalink Reply
strandbein
Thank you for the comprehensive explanation.
strandbein replied on at Permalink Reply
strandbein
FYI: the display errors on mobile devices no longer exist with:
.mfp-wrap, .mfp-bg {
   top:0 !important;
   position:fixed !important;
}
JohntheFish replied on at Permalink Reply
JohntheFish
Thank you for posting this. I expect others will benefit.

concrete5 Environment Information

# Concrete Version
Core Version - 9.2.8
Version Installed - 9.2.8
Database Version - 20240122172319

# Hostname
dd29806

# Environment
production

# Database Information
Version: 10.5.23-MariaDB-1:10.5.23+maria~ubu2004-log
SQL Mode: NO_ENGINE_SUBSTITUTION
Character Set: utf8mb4
Collation: utf8mb4_unicode_ci

# Concrete Packages
Add Animation (1.0.1), Advanced HTML Block (1.1), Block Builder (2.6.1), Buttons Factory Pro (5.0.4), Captcha by Cloudflare Turnstile (1.0.1), Container Check (9.0.2), Ele-PHP-ant Info (9.0.5), Empty Anchor (1.1.0), Enlil Page List (0.9.8.4), Enlil Search Templates (0.9.0.2), Extreme Clean (9.1.7), Favorite Pages (2.2), Geolocation with MaxMind GeoIP2 (1.3.1), Magic Tabs (9.0.8), Manual Nav (3.0.0), Modena Theme (2.2.0), Nestable Manual Nav (9.0.1), Omni Gallery (9.2.26), Page Redirect (1.0), Script Output (1.2.1), Stored Settings Manager (9.0.2), Theme Styling Tool (1.2.3), V3 Email Obfuscator (3.0.0)

# Concrete Overrides
blocks/next_previous/templates/modena_next_previous_pfeile/view Kopie 2.php, blocks/next_previous/templates/modena_next_previous_pfeile/view.php, blocks/next_previous/templates/modena_next_previous_pfeile/view Kopie 3.php, blocks/next_previous/templates/modena_next_previous_pfeile/view Kopie 4.php, blocks/next_previous/templates/modena_next_previous_pfeile/view kopie2.php, blocks/next_previous/templates/modena_next_previous_pfeile/view Kopie.php, blocks/next_previous/templates/modena_next_previous_pfeile/view orig.php, blocks/next_previous/templates/modena_next_previous_pfeile, blocks/next_previous/templates/modena_next_previous_mobil/view (05.02.2024, 14-35-32).php, blocks/next_previous/templates/modena_next_previous_mobil/view (05.02.2024, 14-34-02).php, blocks/next_previous/templates/modena_next_previous_mobil/view Kopie 2.php, blocks/next_previous/templates/modena_next_previous_mobil/view.php, blocks/next_previous/templates/modena_next_previous_mobil/view (05.02.2024, 14-38-26).php, blocks/next_previous/templates/modena_next_previous_mobil/view Kopie.php, blocks/next_previous/templates/modena_next_previous_mobil/view (05.02.2024, 14-44-28).php, blocks/next_previous/templates/modena_next_previous_mobil/view (05.02.2024, 14-39-21).php, blocks/next_previous/templates/modena_next_previous_mobil, blocks/next_previous/templates/modena_next_previous_strich_unten/view.php, blocks/next_previous/templates/modena_next_previous_strich_unten, blocks/next_previous/templates, blocks/next_previous, blocks/autonav/templates/sidebar-nav-style-2/view.php, blocks/autonav/templates/sidebar-nav-style-2, blocks/autonav/templates/sidebar-nav-style-1-Jens/view.php, blocks/autonav/templates/sidebar-nav-style-1-Jens, blocks/autonav/templates/main-nav/view.php, blocks/autonav/templates/main-nav, blocks/autonav/templates/main-nav-placeholders/view.php, blocks/autonav/templates/main-nav-placeholders, blocks/autonav/templates, blocks/autonav, blocks/jl_magic_tabs/templates/Modena_1_Individuell/view.css, blocks/jl_magic_tabs/templates/Modena_1_Individuell/view.php, blocks/jl_magic_tabs/templates/Modena_1_Individuell/view orig.css, blocks/jl_magic_tabs/templates/Modena_1_Individuell, blocks/jl_magic_tabs/templates/m2vr, blocks/jl_magic_tabs/templates/Modena_1_vl_Individuell/view.css, blocks/jl_magic_tabs/templates/Modena_1_vl_Individuell/view.php, blocks/jl_magic_tabs/templates/Modena_1_vl_Individuell, blocks/jl_magic_tabs/templates/mProdukte/view.css, blocks/jl_magic_tabs/templates/mProdukte/view.php, blocks/jl_magic_tabs/templates/mProdukte/view orig.css, blocks/jl_magic_tabs/templates/mProdukte, blocks/jl_magic_tabs/templates/Modena_2_vr_Individuell/view.css, blocks/jl_magic_tabs/templates/Modena_2_vr_Individuell/view.php, blocks/jl_magic_tabs/templates/Modena_2_vr_Individuell, blocks/jl_magic_tabs/templates/buttons_pro_vertical_right_example/view.css, blocks/jl_magic_tabs/templates/buttons_pro_vertical_right_example/view.php, blocks/jl_magic_tabs/templates/buttons_pro_vertical_right_example, blocks/jl_magic_tabs/templates/Modena_2_vl_Individuell/view.css, blocks/jl_magic_tabs/templates/Modena_2_vl_Individuell/view.php, blocks/jl_magic_tabs/templates/Modena_2_vl_Individuell/view original.php, blocks/jl_magic_tabs/templates/Modena_2_vl_Individuell/view original.css, blocks/jl_magic_tabs/templates/Modena_2_vl_Individuell, blocks/jl_magic_tabs/templates/buttons_pro_PRS_Tab/view.css, blocks/jl_magic_tabs/templates/buttons_pro_PRS_Tab/view.php, blocks/jl_magic_tabs/templates/buttons_pro_PRS_Tab, blocks/jl_magic_tabs/templates/m2/view.css, blocks/jl_magic_tabs/templates/m2/view Kopie.css, blocks/jl_magic_tabs/templates/m2/view.php, blocks/jl_magic_tabs/templates/m2, blocks/jl_magic_tabs/templates/mProduktevl/view.css, blocks/jl_magic_tabs/templates/mProduktevl/view.php, blocks/jl_magic_tabs/templates/mProduktevl/view orig.css, blocks/jl_magic_tabs/templates/mProduktevl, blocks/jl_magic_tabs/templates/Modena_2_Individuell/view.css, blocks/jl_magic_tabs/templates/Modena_2_Individuell/view Kopie.css, blocks/jl_magic_tabs/templates/Modena_2_Individuell/view.php, blocks/jl_magic_tabs/templates/Modena_2_Individuell, blocks/jl_magic_tabs/templates/m2vl/view.css, blocks/jl_magic_tabs/templates/m2vl/view original.css, blocks/jl_magic_tabs/templates/m2vl, blocks/jl_magic_tabs/templates/m1vr/view.css, blocks/jl_magic_tabs/templates/m1vr/view.php, blocks/jl_magic_tabs/templates/m1vr, blocks/jl_magic_tabs/templates/buttons_pro_vertical_left_example/view.css, blocks/jl_magic_tabs/templates/buttons_pro_vertical_left_example/view.php, blocks/jl_magic_tabs/templates/buttons_pro_vertical_left_example, blocks/jl_magic_tabs/templates/mvl/view.css, blocks/jl_magic_tabs/templates/mvl/view.php, blocks/jl_magic_tabs/templates/mvl, blocks/jl_magic_tabs/templates/m1/view.css, blocks/jl_magic_tabs/templates/m1/view.php, blocks/jl_magic_tabs/templates/m1/view orig.css, blocks/jl_magic_tabs/templates/m1, blocks/jl_magic_tabs/templates/buttons_pro_pills_example/view.css, blocks/jl_magic_tabs/templates/buttons_pro_pills_example/view.php, blocks/jl_magic_tabs/templates/buttons_pro_pills_example, blocks/jl_magic_tabs/templates, blocks/jl_magic_tabs

# Concrete Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - On - If blocks on the particular page allow it.
Full Page Cache Lifetime - Only when manually removed or the cache is cleared.

# Database Entities Settings
Doctrine Development Mode - Off

# Server Software
Apache

# Server API
fpm-fcgi

# PHP Version
8.3.3

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, http, iconv, imagick, imap, intl, json, ldap, libxml, mailparse, mbstring, mongodb, mysqli, mysqlnd, OAuth, odbc, openssl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, random, raphf, Reflection, session, shmop, SimpleXML, soap, sodium, SPL, sqlite3, standard, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 3000
max_multipart_body_parts - -1
memory_limit - 256M
post_max_size - 200M
upload_max_filesize - 200M
zend.exception_string_param_max_len - 15
zend.max_allowed_stack_size - 0
ldap.max_links - Unlimited
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
raphf.persistent_handle.limit - -1
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
unserialize_max_depth - 4096
opcache.jit_bisect_limit - 0
opcache.jit_max_exit_counters - 8192
opcache.jit_max_loop_unrolls - 8
opcache.jit_max_polymorphic_calls - 2
opcache.jit_max_recursive_calls - 2
opcache.jit_max_recursive_returns - 2
opcache.jit_max_root_traces - 1024
opcache.jit_max_side_traces - 128
opcache.jit_max_trace_length - 1024
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.