[ 
https://issues.apache.org/jira/browse/CB-10797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15236745#comment-15236745
 ] 

vB Results, LLC. edited comment on CB-10797 at 4/12/16 7:27 AM:
----------------------------------------------------------------

[~shazron] I discovered the cause of this.  In a typical browser, you scroll 
the content and the viewport is static.  In WKWebView it's the inverse -- 
content is static, the viewport is what scrolls/moves.

So, technically, fixed position elements are being laid out in the right place 
on the page, but this position wasn't implemented to work with a scrolling 
viewport.  Proper support was apparently introduced to Safari in iOS 5, but 
left out of WKWebView.

I think this was done by design to discourage developers from implementing 
non-native scrolling.  Very ham-fisted way to go about it but it is what it is. 
 Also, Crosswalk for iOS is just a wrapper for WKWebView so no luck there.

Is there any way to enable the legacy content scrolling functionality?

This is out of the scope of cordova, so I'm closing this issue, but if anyone 
knows a native fix to this do share in the comments here.  The only option I 
know of so far is mucking with the onscroll event in JS and that is very hacky.


was (Author: vbresults):
[~shazron] I discovered the cause of this.  In a typical browser, you scroll 
the content and the viewport is static.  In WKWebView it's the inverse -- 
content is static, the viewport is what scrolls/moves.

So, technically, fixed positions are being laid out in the right place on the 
page, but this position wasn't implemented to work with a scrolling viewport.  
Proper support was apparently introduced to Safari in iOS 5, but left out of 
WKWebView.

I think this was done by design to discourage developers from implementing 
non-native scrolling.  Very ham-fisted way to go about it but it is what it is. 
 Also, Crosswalk for iOS is just a wrapper for WKWebView so no luck there.

Is there any way to enable the legacy content scrolling functionality?

This is out of the scope of cordova, so I'm closing this issue, but if anyone 
knows a native fix to this do share in the comments here.  The only option I 
know of so far is mucking with the onscroll event in JS and that is very hacky.

> WKWebView CSS Position:Fixed Moves
> ----------------------------------
>
>                 Key: CB-10797
>                 URL: https://issues.apache.org/jira/browse/CB-10797
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin WKWebViewEngine
>    Affects Versions: 6.0.0, 5.4.1
>         Environment: iOS 9
> Cordova 6.0.0
> Cordova-iOS 4.1.0
> Cordova-Plugin-WkWebView-Engine 1.0.1
>            Reporter: vB Results, LLC.
>              Labels: iOS, triaged
>
> CSS fixed position elements exhibit major problems in the WKWebView Engine -- 
> they are not fixed.  They move and often break the layout -- to resolve a 
> similar problem in Android we had to go with Crosswalk.
> This isn't present in Mobile Safari so we've been looking at moving to 
> Crosswalk since support for iOS is coming soon.  Not sure if this is an Apple 
> or Cordova bug; I'd prefer to stick with WKWebView if the latter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to