WebKit throws an exception on iOS 8 to call setBeingRemoved:

I have an application that relies on UIWebViews for some of its screens, but starting with iOS 8 I began to notice that the following exception sometimes occurs:

WebKit canceled the uncaught exception in webView: willRemoveScrollingLayer: withContentsLayer: forNode: delegate: <NSInvalidArgumentException> - [WebActionDisablingCalayerDelegate setBeingRemoved:]: unrecognized selector sent to the instance (...)

This usually happens in response to a button click or link to a web view (without anything else on the Objective-C side), and after that most of the functions in the web browser will be broken (links are not accessible for clicks, etc. )

I have seen at least one more question related to this error message, but there are no definitive answers yet.

Has anyone encountered this problem and found out what is wrong / what causes it? It seems to be completely dependent on the HTML content, which means that the fact that this exception is thrown is an iOS 8 bug.

+7
ios ios8 webkit uiwebview
source share
4 answers

Turns out this error was caused by using the following CSS property in an iframe in my HTML:

-webkit-overflow-scrolling: touch; 

Deleted (now we are looking for a suitable alternative) and UIWebView will no longer work.

+3
source share

You can use WKWebView instead of UIWebView . (It was first included in iOS 8). I have tried this and it seems that it does not have this error.

If you are targeting pre-iOS 8, you can implement backup procedures for loading UIWebView or WKWebView, here you are an out-of-the-box implementation

+3
source share

I put -webkit-transform: translateZ(0px) on my body element. It seems to fix the problem and I could save the -webkit-overflow-scrolling styles.

Also here: https://stackoverflow.com/a/316829/

+1
source share

I changed the fill: 0 16px 0 26%; to margin on the left: 25%; and it works for me

0
source share

All Articles