{"action":"created","issue":{"url":"https://api.github.com/repos/apache/cordova-ios/issues/417","repository_url":"https://api.github.com/repos/apache/cordova-ios","labels_url":"https://api.github.com/repos/apache/cordova-ios/issues/417/labels{/name}","comments_url":"https://api.github.com/repos/apache/cordova-ios/issues/417/comments","events_url":"https://api.github.com/repos/apache/cordova-ios/issues/417/events","html_url":"https://github.com/apache/cordova-ios/issues/417","id":362270079,"node_id":"MDU6SXNzdWUzNjIyNzAwNzk=","number":417,"title":"Keyboard Dismissal Leaves Viewport Shifted in iOS 12 / XCode 10","user":{"login":"booleanbetrayal","id":981825,"node_id":"MDQ6VXNlcjk4MTgyNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/981825?v=4","gravatar_id":"","url":"https://api.github.com/users/booleanbetrayal","html_url":"https://github.com/booleanbetrayal","followers_url":"https://api.github.com/users/booleanbetrayal/followers","following_url":"https://api.github.com/users/booleanbetrayal/following{/other_user}","gists_url":"https://api.github.com/users/booleanbetrayal/gists{/gist_id}","starred_url":"https://api.github.com/users/booleanbetrayal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/booleanbetrayal/subscriptions","organizations_url":"https://api.github.com/users/booleanbetrayal/orgs","repos_url":"https://api.github.com/users/booleanbetrayal/repos","events_url":"https://api.github.com/users/booleanbetrayal/events{/privacy}","received_events_url":"https://api.github.com/users/booleanbetrayal/received_events","type":"User","site_admin":false},"labels":[{"id":20551886,"node_id":"MDU6TGFiZWwyMDU1MTg4Ng==","url":"https://api.github.com/repos/apache/cordova-ios/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-09-20T16:37:33Z","updated_at":"2018-10-24T20:39:50Z","closed_at":null,"author_association":"NONE","body":"Seeing a blocking issue after updating to XCode 10 related to keyboard displacement and then dismissal.\r\n\r\nWhen an input that would require webview centering is clicked, the viewport is repositioned to center that input, as iOS has traditionally done. However, when dismissing the keyboard, the viewport is not re-positioned properly back to its original position. \r\n\r\n**This can leave large gaps where the webview is no longer visible.** In the attached screenshots, you can see that this leaves a large margin where the viewport is rendering, shifted upwards and off-screen by a 100+ pixels. There appears to be no way do re-position the viewport short of additional input focus changes, each resulting in similar offset issues.\r\n\r\nTo add some additional confusion, it appears this **only happens on iOS 12 / XCode 10** produced installs, such that:\r\n\r\n- This issue is present **ONLY** on builds produced in XCode 10 targeting iOS 12 devices.\r\n- This issue affects **ALL** tested device types on iOS 12.\r\n- This issue is present via **Legacy AND Modern** build systems\r\n- iOS 10 / 11 devices targeted via XCode 10 are **NOT** affected.\r\n- iOS 10 / 11 / 12 devices targeted via XCode 9 are **NOT** affected.\r\n\r\nAny info on potential workarounds or patches would be greatly appreciated. I've already looked into upgrading our `cordova-plugin-ionic-webview` plugin (as well as various others), but it appears to not have any relevance with the issue. At this point, we're looking at downgrading XCode in order to get working builds out.\r\n\r\n----\r\n\r\n<details>\r\n  <summary>Click Here to See Example Screenshots</summary>\r\n\r\n ----\r\n_Captured via iOS Simulator, but also experienced on various physical devices running iOS 12_\r\n\r\n**Prior to focusing an input:**\r\n<img width=\"230\" alt=\"1\" src=\"https://user-images.githubusercontent.com/981825/45831826-8e79fc00-bcbd-11e8-9396-ce5a0180ee55.png\">\r\n\r\n**Input focused: / keyboard present**\r\n<img width=\"230\" alt=\"2\" src=\"https://user-images.githubusercontent.com/981825/45831893-b2d5d880-bcbd-11e8-869f-34b3a9198ae5.png\">\r\n\r\n**Keyboard dismissed / HTML element highlighted in inspector:**\r\n![3](https://user-images.githubusercontent.com/981825/45831984-e6186780-bcbd-11e8-9ba7-283af87ea342.png)\r\n\r\n</details>\r\n\r\n----\r\n\r\n<details>\r\n  <summary>Click Here for Environment Details</summary>\r\n\r\n----\r\n\r\n**OS:** OSX 10.13.6 (High Sierra)\r\n**XCode:** 10.0 (10A255)\r\n**cordova:** 8.0.0\r\n**cordova-ios:** 4.5.4\r\n**cordova-plugins:**\r\n- cordova-android-support-gradle-release 1.2.0 \"cordova-android-support-gradle-release\"\r\n- cordova-custom-config 5.0.2 \"cordova-custom-config\"\r\n- cordova-plugin-app-event 1.2.1 \"Application Events\"\r\n- cordova-plugin-apprate 1.4.0 \"AppRate\"\r\n- cordova-plugin-camera 4.0.3 \"Camera\"\r\n- cordova-plugin-device 2.0.1 \"Device\"\r\n- cordova-plugin-dialogs 2.0.1 \"Notification\"\r\n- cordova-plugin-facebook4 1.9.1 \"Facebook Connect\"\r\n- cordova-plugin-file 6.0.1 \"File\"\r\n- cordova-plugin-googleplus 5.2.1 \"Google SignIn\"\r\n- cordova-plugin-inappbrowser 2.0.2 \"InAppBrowser\"\r\n- cordova-plugin-ionic-webview 1.1.16 \"cordova-plugin-ionic-webview\"\r\n- cordova-plugin-market 1.2.0 \"Market\"\r\n- cordova-plugin-media 4.0.1-dev \"Media\"\r\n- cordova-plugin-nativestorage 2.3.2 \"NativeStorage\"\r\n- cordova-plugin-network-information 2.0.1 \"Network Information\"\r\n- cordova-plugin-spinner-dialog 1.3.1 \"SpinnerDialog\"\r\n- cordova-plugin-splashscreen 5.0.3-dev \"Splashscreen\"\r\n- cordova-plugin-whitelist 1.3.3 \"Whitelist\"\r\n- cordova-plugin-x-socialsharing 5.3.2 \"SocialSharing\"\r\n- cordova-support-google-services 1.1.0 \"cordova-support-google-services\"\r\n- de.appplant.cordova.plugin.local-notification 0.8.5 \"LocalNotification\"\r\n- es6-promise-plugin 4.2.2 \"Promise\"\r\n- phonegap-plugin-multidex 1.0.0 \"Multidex\"\r\n- phonegap-plugin-push 2.2.3 \"PushPlugin\"\r\n</details>\r\n\r\n----\r\n"},"comment":{"url":"https://api.github.com/repos/apache/cordova-ios/issues/comments/432819727","html_url":"https://github.com/apache/cordova-ios/issues/417#issuecomment-432819727","issue_url":"https://api.github.com/repos/apache/cordova-ios/issues/417","id":432819727,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjgxOTcyNw==","user":{"login":"booleanbetrayal","id":981825,"node_id":"MDQ6VXNlcjk4MTgyNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/981825?v=4","gravatar_id":"","url":"https://api.github.com/users/booleanbetrayal","html_url":"https://github.com/booleanbetrayal","followers_url":"https://api.github.com/users/booleanbetrayal/followers","following_url":"https://api.github.com/users/booleanbetrayal/following{/other_user}","gists_url":"https://api.github.com/users/booleanbetrayal/gists{/gist_id}","starred_url":"https://api.github.com/users/booleanbetrayal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/booleanbetrayal/subscriptions","organizations_url":"https://api.github.com/users/booleanbetrayal/orgs","repos_url":"https://api.github.com/users/booleanbetrayal/repos","events_url":"https://api.github.com/users/booleanbetrayal/events{/privacy}","received_events_url":"https://api.github.com/users/booleanbetrayal/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T20:39:50Z","updated_at":"2018-10-24T20:39:50Z","author_association":"NONE","body":"Thanks @KhanhPhamDinh ! I've validated that this is working for me in a fork of the cordova-ionic-webview project, and have submitted a PR crediting you: https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/201"}}
{"actor":{"display_login":"booleanbetrayal"}}