You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Juan Miguel (JIRA)" <ji...@apache.org> on 2017/10/04 08:33:00 UTC

[jira] [Updated] (CB-13387) ios11 scroll whitespace after click

     [ https://issues.apache.org/jira/browse/CB-13387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juan Miguel updated CB-13387:
-----------------------------
    Attachment: ios11_error.png

> ios11 scroll whitespace after click
> -----------------------------------
>
>                 Key: CB-13387
>                 URL: https://issues.apache.org/jira/browse/CB-13387
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-ios
>    Affects Versions: cordova-ios@4.4.0, cordova-ios@4.3.1, cordova-ios@4.5.1, cordova-ios 4.5.0
>         Environment: I'm facing this issue testing with xCode 9 in iOS 11 (simulator and device), every device model, using cordova-ios from 3.8.0 to 4.5.1. I have this issue in many projects, but I create a new one without any plugins just for testing it, and it reproduces in a simple environment.
> From what I have tested, i think it only happens when using new meta viewport-fit=cover at html file.
>            Reporter: Juan Miguel
>            Assignee: Suraj Pindoria
>              Labels: ios11, statusbar, xcode9
>         Attachments: ios11_error.png
>
>
> When you have dynamic content in your app, it shows correctly at first moment after insert/show it, but when some click event is dispatched (and an event listener is attached) the scroll element goes down leaving an empty zone, where the elements were previously. If no event listener is attached, this issue doesn't happen. If the content is not added dynamically, the scroll starts in wrong position.
> I have been testing lot of things, and the problem is that after that brokener-click, the scrolls remain in scrollTop position -44, which should be impossible (and if programatically you try to go to this position, it goes to 0 position)
> I have made an image showing the issue, sorry for it's appearance, but I think it shows clearly what happens:
> !attachment-name.jpg!
> As the image shows, it leaves a white space equal to the 'safe-zone' of the statusbar, in iPhone X are 44px, other iPhones 20px. 
> h2. Steps to reproduce
> # Create a new project 
> {code:none}
> cordova create ios11_error com.test Test
> {code}
> # Configure config.xml for disabling overscoll (I attach my configured [^config.xml], but you just need to add the next code under iOS platform):
> {code:xml}
> <preference name="DisallowOverscroll" value="true" />
> {code}
> # Replace www/index.html with the attached here [^index.html]
> # Create ios platform
> {code:none}
> cordova platform add ios
> {code}
> # Add launch images for the device you want to use (if you are going to test in iPhone X, it is not included yet by default with cordova; with other models it is not neccesary)
> # Launch application in your device or simulator. 
> When launched, everything looks fine and in right place, you can scroll and everything keep where it should. But if you make a tap where there is a click listener, the scroll element 'goes down' and you can scroll to this 'overzone', and the top scrolls goes to negative position and keeps there (-44px in iPhone X, -20px in other devices; which is the statusbar size).
> It doesn't matter if you make a click in an element and doesn't make anything in that listener (blue header), or even if that listener only has prevents calls (red square in left down corner), scroll breaks. If you tap in green square, right down corner, doing a hide/show put the view again in right position.
> If a click is made in a zone without a listener, anything happens and everything keeps in right place.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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