If I display an HTML document (that is not wider then the screen) in a WKWebView as full screen view on an iPad or iPhone, it scrolls as expected, vertically only, and not at all horizontally.
If the same WKWebView is presented inside the detail view of a UISplitViewController, it will have a strange rubber-band horizontal scrolling behaviour. The document is displayed at the correct width, but you can pull the document out to the left and right. After you let go, it snaps back.
This is a usability problem for a web system I am trying to display inside a split view controller.
Does anybody know why this is the case, and is it possible to cause WKWebView to use the normal scrolling behaviour?
This is because the parent UISplitViewController is reporting incorrect dimensions to the WebView - it is (probably) failing to subtract the 0.5 points for the divider line from the detail view's frame.
There doesn't appear to be a solution.
A workaround is to add an 0.5 point contentInset to the left side of the WKWebView's ScrollView.
Note this solution was developed for iOS11. Future versions of iOS may fix this miscalculation. Will probably file a bug with Apple.