REGRESSION (r196271): Web Inspector: DOM element loses focus/active selection after...
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Mar 2017 00:52:07 +0000 (00:52 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Mar 2017 00:52:07 +0000 (00:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=168119
<rdar://problem/30466013>

Reviewed by Brian Burg.

Fix a regression caused by http://trac.webkit.org/changeset/196271, which
updated WebInspector.isEventTargetAnEditableField to detect the editing
scenarios used by DOMTreeElement and DataGrid. This subtly changed the
behavior of WebInspector._focusChanged, which expected all editable fields
to be backed by a CodeMirror instance.

* UserInterface/Base/Main.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213689 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Main.js

index 6280981..7b057fe 100644 (file)
@@ -1,3 +1,19 @@
+2017-03-09  Matt Baker  <mattbaker@apple.com>
+
+        REGRESSION (r196271): Web Inspector: DOM element loses focus/active selection after committing an inline attribute editor in DOMTreeOutline
+        https://bugs.webkit.org/show_bug.cgi?id=168119
+        <rdar://problem/30466013>
+
+        Reviewed by Brian Burg.
+
+        Fix a regression caused by http://trac.webkit.org/changeset/196271, which
+        updated WebInspector.isEventTargetAnEditableField to detect the editing
+        scenarios used by DOMTreeElement and DataGrid. This subtly changed the
+        behavior of WebInspector._focusChanged, which expected all editable fields
+        to be backed by a CodeMirror instance.
+
+        * UserInterface/Base/Main.js:
+
 2017-03-09  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Show HTTP protocol version and other Network Load Metrics (IP Address, Priority, Connection ID)
index 6354adb..b45cbd9 100644 (file)
@@ -1328,8 +1328,8 @@ WebInspector._focusChanged = function(event)
         if (codeMirrorEditorElement && codeMirrorEditorElement !== this.currentFocusElement) {
             this.previousFocusElement = this.currentFocusElement;
             this.currentFocusElement = codeMirrorEditorElement;
+            return;
         }
-        return;
     }
 
     var selection = window.getSelection();