Summary: | Regression (iOS 12): Keyboard dismissal leaves WKWebView viewport-fit=cover content offscreen | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Darryl Pogue <dvpdiner2> | ||||||
Component: | WebKit API | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Major | CC: | 709922234, bfulgham, commit-queue, david.goelzhaeuser, dbates, lindsay-needs-sleep, megan_gardner, ng, radars, rniwa, simon.fraser, steffen.schmidt, thorton, webkit-bug-importer, wenson_hsieh | ||||||
Priority: | P2 | Keywords: | InRadar, Regression | ||||||
Version: | Safari 12 | ||||||||
Hardware: | iPhone / iPad | ||||||||
OS: | iOS 12 | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=193475 | ||||||||
Attachments: |
|
Description
Darryl Pogue
2018-12-10 11:58:46 PST
Did a bit of investigating here. On dismissing the keyboard, in WKWebView's _contentBoundsExtendedForRubberbandingWithScale we're getting a verticalRubberbandAmountInContentCoordinates of 260, which leads to the content being partly offscreen. This seems to be due to [_scrollView contentOffset] not being adjusted for the keyboard dismissal at the time that we're reading it, because it is indicating (0, 260) Is there an update to this issue? I was hoping that my fix for https://trac.webkit.org/r240027 would fix this one as well but it didn't so it's back to our queue of the root cause analysis. This issue only occurs in combination with iOS >= 12 and XCode >=10. Apple requires developers to build Apps with iOS 12.1 and Xcode 10.1 on March 2019. Am I right, after this issue has been fixed Apple needs to pull the latest WebKit and implement it into iOS WKWebView, or is there some kind of automatic update process? (In reply to David Gölzhäuser from comment #4) > This issue only occurs in combination with iOS >= 12 and XCode >=10. Apple > requires developers to build Apps with iOS 12.1 and Xcode 10.1 on March 2019. Hm... that's strange. Xcode version itself shouldn't affect things. Are you also changing the target SDK when you do that? If so, could you tell us in which target SDK you're seeing the issue in iOS 12? There are certain features and behaviors we enable only when an app is linked against newer SDKs. So if this problem only occurs with newer SDKs, then I suspect one of those features / behaviors are the cause of it. > Am I right, after this issue has been fixed Apple needs to pull the latest > WebKit and implement it into iOS WKWebView, or is there some kind of > automatic update process? It depends. At some point, Apple make a branch of WebKit for a given release. If the fix has been landed by the time we made a branch, then the fix is likely to stay in the branch unless it caused a regression, etc... If the fix wasn't made by the time a given branch was created, then we'd have to manually merge it into the branch to be included in the release which uses that branch. There is a number of internal processes Apple uses to determine which change is merged into any given branch/release. (In reply to Ryosuke Niwa from comment #5) > (In reply to David Gölzhäuser from comment #4) > > This issue only occurs in combination with iOS >= 12 and XCode >=10. Apple > > requires developers to build Apps with iOS 12.1 and Xcode 10.1 on March 2019. > > Hm... that's strange. Xcode version itself shouldn't affect things. Are you > also changing the target SDK when you do that? If so, could you tell us in > which target SDK you're seeing the issue in iOS 12? > > There are certain features and behaviors we enable only when an app is > linked against newer SDKs. So if this problem only occurs with newer SDKs, > then I suspect one of those features / behaviors are the cause of it. This bug only happens when building against the iOS 12 SDKs. This matches the comments in the https://trac.webkit.org/changeset/233905/webkit > UIScrollView's _systemContentInset no longer includes keyboard insets in apps linked on iOS 12+ when contentInsetAdjustmentBehavior is None. > FirstWhereUIScrollViewDoesNotApplyKeyboardInsetsUnconditionally = DYLD_IOS_VERSION_12_0, Any updates on this? This is still an issue in iOS 13 beta 8 :( Created attachment 378115 [details]
Patch
Comment on attachment 378115 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=378115&action=review Thanks for the patch but we need a API test or a layout test. > Source/WebKit/ChangeLog:7 > + We need a description as to how the bug was caused and how it's fixed. Created attachment 378134 [details]
Patch
Great. Thanks for the patch! Comment on attachment 378134 [details] Patch Clearing flags on attachment: 378134 Committed r249585: <https://trac.webkit.org/changeset/249585> All reviewed patches have been landed. Closing bug. |