I have enabled developer extras for my WKWebView, but when I select "Inspect Element" from the dropdown, the inspector does not render properly. It's basically transparent, and the bottom half of the web view flickers and flashes, but no inspector content ever appears.
I can resize the window to be too small for the inspector, and then when I Inspect Element the inspector appears as an external window, and everything works properly. However, adding a window-resize/invoke-inspector/window-resize to every test cycle in rather painful.
Acceptable answers may include:
... or any other ideas for how to tackle this.
Seen under 10.14 (Mojave) and 10.15 (Catalina). Any help or ideas are greatly appreciated.
The issue appears to be with using constraints on a WKWebView. If you have an autolayout view and a WKWebView, turning off constraints fixes the inspector rendering. In my app, the UI is just a big browser window, so I could turn off autolayout for the view, add springs and struts, and everything renders properly.
I hate answering my own question, but...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With