From 2fcb37b39f6ec03e54839b42196fca0c98271ead Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Thu, 22 Oct 2026 09:27:44 +0200 Subject: [PATCH] Fix Firefox Android cookie dialog back gestures --- functions.php | 19 +++++++++++++++++++ style.css | 12 ++++++++++++ 2 files changed, 31 insertions(+) diff --git a/functions.php b/functions.php index cb02fb2..8978def 100644 --- a/functions.php +++ b/functions.php @@ -59,6 +59,25 @@ function c1024_2026_disable_w3tc_javascript_lazyload( $can_process ) { } add_filter( 'w3tc_lazyload_can_process', 'c1024_2026_disable_w3tc_javascript_lazyload' ); +/** + * Avoid a Firefox Android close watcher for the cookie plugin's CSS-hidden dialog. + * + * GDPR Cookie Compliance 5.2.2 keeps its native dialog permanently open and manages + * visibility/focus itself. Use ARIA semantics without the native close watcher + * that consumes Android back gestures (Mozilla bug 2078216). + */ +function c1024_2026_gdpr_modal_dialog( $html ) { + $modal = preg_replace( + '/]*)>(.*)<\/dialog>/s', + '', + $html, + 1 + ); + + return null !== $modal ? $modal : $html; +} +add_filter( 'gdpr_modal_base_module', 'c1024_2026_gdpr_modal_dialog' ); + function c1024_2026_block_editor_assets() { // Load the complete canvas stylesheet inside Gutenberg's editor iframe. wp_enqueue_style( 'c1024-2026-editor-style', get_theme_file_uri( '/editor-style.css' ), array(), '1.0.0' ); diff --git a/style.css b/style.css index 39e47dd..eed2210 100644 --- a/style.css +++ b/style.css @@ -221,6 +221,18 @@ button { .site-header.is-hidden { transform: translateY(-105%); } +/* Match the cookie plugin's native-dialog layout for our ARIA-dialog wrapper. */ +.gdpr_lightbox div#moove_gdpr_cookie_modal[role="dialog"] { + display: flex; + position: relative; + padding: 0; + background: transparent; + border: none; + width: 100%; + height: 100%; + justify-content: center; + align-items: center; +} .header-inner { display: flex; align-items: center;