diff --git a/lib/src/widgets/iframe_mobile.dart b/lib/src/widgets/iframe_mobile.dart index 55223b3478..96b3991cbc 100644 --- a/lib/src/widgets/iframe_mobile.dart +++ b/lib/src/widgets/iframe_mobile.dart @@ -30,16 +30,20 @@ class IframeContentElement extends ReplacedElement { return Container( width: width ?? (height ?? 150) * 2, height: height ?? (width ?? 300) / 2, - child: WebView( - initialUrl: src, - key: key, - javascriptMode: sandboxMode == null || sandboxMode == "allow-scripts" - ? JavascriptMode.unrestricted - : JavascriptMode.disabled, - navigationDelegate: navigationDelegate, - gestureRecognizers: { - Factory(() => VerticalDragGestureRecognizer()) - }, + child: ContainerSpan( + style: context.style, + newContext: context, + child: WebView( + initialUrl: src, + key: key, + javascriptMode: sandboxMode == null || sandboxMode == "allow-scripts" + ? JavascriptMode.unrestricted + : JavascriptMode.disabled, + navigationDelegate: navigationDelegate, + gestureRecognizers: { + Factory(() => VerticalDragGestureRecognizer()) + }, + ), ), ); } diff --git a/lib/src/widgets/iframe_web.dart b/lib/src/widgets/iframe_web.dart index 2ca3c79148..1000e778a1 100644 --- a/lib/src/widgets/iframe_web.dart +++ b/lib/src/widgets/iframe_web.dart @@ -39,11 +39,15 @@ class IframeContentElement extends ReplacedElement { return Container( width: width ?? (height ?? 150) * 2, height: height ?? (width ?? 300) / 2, - child: Directionality( - textDirection: TextDirection.ltr, - child: HtmlElementView( - viewType: createdViewId, - ) + child: ContainerSpan( + style: context.style, + newContext: context, + child: Directionality( + textDirection: TextDirection.ltr, + child: HtmlElementView( + viewType: createdViewId, + ) + ), ) ); }