Fix Firefox Android cookie dialog back gestures
This commit is contained in:
@@ -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' );
|
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 id="moove_gdpr_cookie_modal" class="gdpr_lightbox-hide" open\b([^>]*)>(.*)<\/dialog>/s',
|
||||||
|
'<div id="moove_gdpr_cookie_modal" class="gdpr_lightbox-hide" role="dialog"$1>$2</div>',
|
||||||
|
$html,
|
||||||
|
1
|
||||||
|
);
|
||||||
|
|
||||||
|
return null !== $modal ? $modal : $html;
|
||||||
|
}
|
||||||
|
add_filter( 'gdpr_modal_base_module', 'c1024_2026_gdpr_modal_dialog' );
|
||||||
|
|
||||||
function c1024_2026_block_editor_assets() {
|
function c1024_2026_block_editor_assets() {
|
||||||
// Load the complete canvas stylesheet inside Gutenberg's editor iframe.
|
// 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' );
|
wp_enqueue_style( 'c1024-2026-editor-style', get_theme_file_uri( '/editor-style.css' ), array(), '1.0.0' );
|
||||||
|
|||||||
@@ -221,6 +221,18 @@ button {
|
|||||||
.site-header.is-hidden {
|
.site-header.is-hidden {
|
||||||
transform: translateY(-105%);
|
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 {
|
.header-inner {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user