diff --git a/src/platform_impl/web/web_sys/media_query_handle.rs b/src/platform_impl/web/web_sys/media_query_handle.rs index 766157a681..79c329b258 100644 --- a/src/platform_impl/web/web_sys/media_query_handle.rs +++ b/src/platform_impl/web/web_sys/media_query_handle.rs @@ -30,6 +30,7 @@ impl MediaQueryListHandle { Self { mql, closure } } + #[allow(dead_code)] pub fn mql(&self) -> &MediaQueryList { &self.mql } diff --git a/src/platform_impl/web/web_sys/resize_scaling.rs b/src/platform_impl/web/web_sys/resize_scaling.rs index e22fba54b8..18b377041f 100644 --- a/src/platform_impl/web/web_sys/resize_scaling.rs +++ b/src/platform_impl/web/web_sys/resize_scaling.rs @@ -127,11 +127,14 @@ impl ResizeScaleInternal { (-webkit-device-pixel-ratio: {current_scale})", ); let mql = MediaQueryListHandle::new(window, &media_query, closure); - debug_assert!( - mql.mql().matches(), - "created media query doesn't match, {current_scale} != {}", - super::scale_factor(window) - ); + // TODO(PLAT-806): There's a winit/browser bug that causes this debug_assert + // to trigger when the print dialog is open. To prevent debug builds from + // panicking, we disable the debug_assert for now. + // debug_assert!( + // mql.mql().matches(), + // "created media query doesn't match, {current_scale} != {}", + // super::scale_factor(window) + // ); mql }