Bug 197188 - [iOS] element.focus() sometimes fails to reveal the focused element when it becomes editable dynamically
Summary: [iOS] element.focus() sometimes fails to reveal the focused element when it b...
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
Keywords: InRadar
Depends on: 197145
  Show dependency treegraph
Reported: 2019-04-22 23:24 PDT by Ryosuke Niwa
Modified: 2019-04-23 10:10 PDT (History)
10 users (show)

See Also:

Fixes the bug (8.70 KB, patch)
2019-04-22 23:38 PDT, Ryosuke Niwa
wenson_hsieh: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2019-04-22 23:24:27 PDT
When an element becomes editable and then immediately focused via element.focus(),
WebKit fails to reveal the element due to the conflicts between scroll-to-reveal code
in WeCore / WebContent process and UI process.

Comment 1 Ryosuke Niwa 2019-04-22 23:38:54 PDT
Created attachment 368015 [details]
Fixes the bug
Comment 2 Wenson Hsieh 2019-04-23 07:57:32 PDT
Comment on attachment 368015 [details]
Fixes the bug

View in context: https://bugs.webkit.org/attachment.cgi?id=368015&action=review

> Source/WebCore/ChangeLog:8
> +        The bug was caused by the scroll-to-reveal code trgiggered by Element::updateFocusAppearance updating

Nit - "trgiggered" => triggered

> Source/WebCore/ChangeLog:10
> +        _zoomToRevealFocusedElement in WKWebContent view had already scrolled the frame view.

Nit - "WKWebContent view" => WKContentView
Comment 3 Ryosuke Niwa 2019-04-23 10:10:13 PDT
Committed r244546: <https://trac.webkit.org/changeset/244546>