Thanks for the reply.
I tried putting the WebViewView inside the Tab, but it still did not work.
The essential problem was that I was using a WebViewView wrapped in a UIViewRepresentable inside a WebViewView.
As a solution, I added the following UITapGestureRecognizer in the makeUIView of the WebView wrapped in UIViewRepresentable.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: