Bug 192745

Summary: [iOS] Focusing a large editable element always scrolls to the top of the element
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, commit-queue, megan_gardner, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Fix iOS open source builds none

Description Wenson Hsieh 2018-12-15 18:33:24 PST
This behavior is undesirable in scenarios where the editable element too large to be centered in the viewport. Currently, we scroll such that the top of the element is aligned with the top of the viewport, but this can result in unnecessary scrolling if the top of the element is already in view, and near the top of the viewport.

In particular, when WKScrollView has a top content inset and has content inside the inset area, this means that tapping to focus an element at (0, 0) in the document always causes the web view to scroll away content in the top inset area.
Comment 1 Radar WebKit Bug Importer 2018-12-15 20:16:39 PST
<rdar://problem/46758445>
Comment 2 Wenson Hsieh 2018-12-16 18:21:30 PST
Created attachment 357424 [details]
Patch
Comment 3 Wenson Hsieh 2018-12-16 19:12:23 PST
Created attachment 357425 [details]
Fix iOS open source builds
Comment 4 WebKit Commit Bot 2018-12-17 20:04:53 PST
Comment on attachment 357425 [details]
Fix iOS open source builds

Clearing flags on attachment: 357425

Committed r239314: <https://trac.webkit.org/changeset/239314>
Comment 5 WebKit Commit Bot 2018-12-17 20:04:54 PST
All reviewed patches have been landed.  Closing bug.