Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions lib/src/widgets/iframe_mobile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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>(() => 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>(() => VerticalDragGestureRecognizer())
},
),
),
);
}
Expand Down
14 changes: 9 additions & 5 deletions lib/src/widgets/iframe_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
),
)
);
}
Expand Down