title: Sheet and alert keeps refreshing my page for WKWebView SwiftUI
body: <p>I am currently using WKWebView and I added a sheet and an alert inside my wkwebview. However, every time I close the sheet or close the alarm, My WkWebView keeps navigating(loading) back to the origin domain that I specified (for this case, google.com). I an wondering how I can fix this issue.</p>
  <p>WebView</p>
  <pre><code>import SwiftUI
  import WebKit
  
  struct WebView : UIViewRepresentable {
      
      let request: URLRequest
      
      func makeUIView(context: Context) -&gt; WKWebView  {
          return WKWebView()
      }
      
      func updateUIView(_ uiView: WKWebView, context: Context) {
          uiView.load(request)
      }
      
  }
  </code></pre>
  <p>Main View</p>
  <pre><code>struct MainView: View {
     var webView: WebView = WebView(request: URLRequest(url: URL(string: &quot;https://www.google.com&quot;)!))
  
   var body: some View {
    VStack(){
     AlertView()
     webView
     SheetScreenView(webView: $webView)
    }
   }
  </code></pre>
  <p>AlertView()</p>
  <pre><code>...
    Button(action: {
    }, label: {}..alert(isPresented: $isBookmarked) {
                  Alert(title: Text(&quot; \(webView.getURL())&quot;), dismissButton: .default(Text(&quot;Ok&quot;)))
              }
  ...
  </code></pre>
  <p>SheetScreenView</p>
  <pre><code>....
  @State private var showingSheet = false
  
      var body: some View {
          Button(&quot;Show Sheet&quot;) {
              showingSheet.toggle()
          }
          .sheet(isPresented: $showingSheet) {
              SheetView()
          }
      }
  ...
  </code></pre>
  <p>SheetView</p>
  <pre><code>struct SheetView: View {
      @Environment(\.presentationMode) var presentationMode
  
      var body: some View {
          Button(&quot;Press to dismiss&quot;) {
              presentationMode.wrappedValue.dismiss()
          }
          .font(.title)
          .padding()
          .background(Color.black)
      }
  }
  </code></pre>