WKWebView Transparency in IOS 11.3

Greetings,


Testing IOS 11.3 Beta on Iphone X, it seems the WKWebView does not respect the transparency rules set. I can confirm that this works fine with IOS 11.2.5. We Initialise WKWebView as follows. I've only tested using Iphone X. Instead of the background of the WebView being transparent, it is completly black.


[self.webView setOpaque:NO];
[self.webView.scrollView setOpaque:NO];
[self.webView setBackgroundColor:[UIColor clearColor]];
[self.webView.scrollView setBackgroundColor:[UIColor clearColor]];

[parentView addSubview:self.webView];
[parentView bringSubviewToFront:self.webView];


Has anything specific changed with the new Safari? or is this a known bug. Again the same content/code works fine with 11.2.5. Thank you!

Replies

Hi!

Same issue here with 11.3 Beta on iPhone X.

If you create a GL canvas, it doesn't respect the transparency properties. It works fine with a 2D canvas though.

Please let us know if there is any fix.


Cheers.

This also happens in the Safari App.

I have made a little demo: https://codepen.io/anon/pen/KQVpMw

If everything works fine you see a half transparent black canvas

gl.clearColor(0.0, 0.0, 0.0, 0.5);
and the underlying red div will shine through.

But on iOS 11.3 in Safari the canvas is full opaque black.


I have filed a apple bugreport and also an Open Radar: https://openradar.appspot.com/radar?id=5018525789847552

Hello!


Also facing this issue with 11.3 Beta on Iphone 7 Plus.

Looking forward to the fix.


Thanks.

It seems the problem is still not resolved with IOS 11.3 Beta 2 Release (15E5178f)

I'm hitting this issue as well with the beta2. We are using a GLCanvas with transparency and the GLCanvas is just stomping the background with black.

This looks like it has been fixed in Beta 3!