Bug 192745 - [iOS] Focusing a large editable element always scrolls to the top of the element
Summary: [iOS] Focusing a large editable element always scrolls to the top of the element
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-15 18:33 PST by Wenson Hsieh
Modified: 2018-12-17 20:04 PST (History)
7 users (show)

See Also:


Attachments
Patch (17.86 KB, patch)
2018-12-16 18:21 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Fix iOS open source builds (18.75 KB, patch)
2018-12-16 19:12 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.