Bug 168119

Summary: REGRESSION (r196271): Web Inspector: DOM element loses focus/active selection after committing an inline attribute editor in DOMTreeOutline
Product: WebKit Reporter: BJ Burg <bburg>
Component: Web InspectorAssignee: Matt Baker <mattbaker>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, mattbaker, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[VIDEO]
none
Patch
none
Patch none

Description BJ Burg 2017-02-10 09:38:14 PST
Created attachment 301162 [details]
[VIDEO]

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
<rdar://problem/30466013>
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]
Patch
Comment 5 Matt Baker 2017-02-15 21:28:25 PST
Created attachment 301701 [details]
Patch
Comment 6 BJ Burg 2017-02-22 18:27:11 PST
Comment on attachment 301701 [details]
Patch

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

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.