Skip to content

Commit

Permalink
Run applyModifiers() when recreating the EnhancedWKWebView.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyome22 committed Jul 26, 2024
1 parent fcecd54 commit e2cd140
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/WebUI/WebView+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ extension WebView: View {

@MainActor
private func makeView() -> Remakeable<EnhancedWKWebView> {
let webView = Remakeable {
EnhancedWKWebView(frame: .zero, configuration: parent.configuration)
let webView = Remakeable<EnhancedWKWebView> {
let wrappedView = EnhancedWKWebView(frame: .zero, configuration: parent.configuration)
parent.applyModifiers(to: wrappedView)
return wrappedView
}
setUpWebViewProxy(webView)
parent.applyModifiers(to: webView.wrappedValue)
Expand Down

0 comments on commit e2cd140

Please sign in to comment.