Bug 168119 - REGRESSION (r196271): Web Inspector: DOM element loses focus/active selection after committing an inline attribute editor in DOMTreeOutline
Summary: REGRESSION (r196271): Web Inspector: DOM element loses focus/active selection...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
Keywords: InRadar
Depends on:
Reported: 2017-02-10 09:38 PST by BJ Burg
Modified: 2017-03-09 16:52 PST (History)
5 users (show)

See Also:

[VIDEO] (9.85 MB, video/quicktime)
2017-02-10 09:38 PST, BJ Burg
no flags Details
Patch (2.12 KB, patch)
2017-02-10 17:37 PST, Matt Baker
no flags Details | Formatted Diff | Diff
Patch (1.89 KB, patch)
2017-02-15 21:28 PST, Matt Baker
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2017-02-10 09:38:14 PST
Created attachment 301162 [details]

Steps to reproduce:

1. Inspect Element
2. Press Enter to edit the first attribute of the element
3. Press Enter again to commit the unedited attribute value
=> DOM attribute has focus ring, but loses active selection

4. Further 'Enter' keypresses should edit/commit the attribute
=> Nothing happens
Comment 1 Radar WebKit Bug Importer 2017-02-10 09:39:36 PST
Comment 2 Matt Baker 2017-02-10 12:50:27 PST
Regressed in http://trac.webkit.org/changeset/196271.
Comment 3 Matt Baker 2017-02-10 17:22:56 PST
This also affects editing DataGridNodes (localStorage). The problem is that these two editing scenarios aren't being handled correctly by WebInspector._focusChanged, which doesn't update the previous/current focus elements when the focus event target is a non-CodeMirror editable field.

Non-editable fields (which until http://trac.webkit.org/changeset/196271 included DOM attributes and grid nodes), as well as editable CodeMirror fields, are handled correctly.
Comment 4 Matt Baker 2017-02-10 17:37:20 PST
Created attachment 301222 [details]
Comment 5 Matt Baker 2017-02-15 21:28:25 PST
Created attachment 301701 [details]
Comment 6 BJ Burg 2017-02-22 18:27:11 PST
Comment on attachment 301701 [details]

Comment 7 WebKit Commit Bot 2017-03-09 16:52:11 PST
Comment on attachment 301701 [details]

Clearing flags on attachment: 301701

Committed r213689: <http://trac.webkit.org/changeset/213689>
Comment 8 WebKit Commit Bot 2017-03-09 16:52:15 PST
All reviewed patches have been landed.  Closing bug.