This is definitely a regression. It used to be possible to tab through attributes, which would cancel the current edit and start editing the next attribute. Steps to reproduce: 1. Inspect an element with >1 attribute in Elements Tab 2. Press 'Enter' to start editing the first attribute 3. Press 'Tab' to cancel editing of first attribute and start editing next attribute => DOMTreeOutline loses selection, sometimes the Quick Console gets caret/focus
<rdar://problem/30466065>
Regressed way back in https://trac.webkit.org/changeset/188138. Tabbing to the next attribute *does* work, as long as the current attribute text changes: --- a/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js +++ b/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js @@ -874,6 +875,9 @@ WebInspector.DOMTreeElement = class DOMTreeElement extends WebInspector.TreeElem _attributeEditingCommitted(element, newText, oldText, attributeName, moveDirection) { + if (newText === oldText) + return; + this._editing = false; var treeOutline = this.treeOutline;
Created attachment 301249 [details] Patch
Comment on attachment 301249 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=301249&action=review > Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js:963 > + if (!moveDirection && newText === oldText) What about all of the other functions with moveDirection? _tagNameEditingCommitted and _attributeNumberEditingCommitted?
Comment on attachment 301249 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=301249&action=review >> Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js:963 >> + if (!moveDirection && newText === oldText) > > What about all of the other functions with moveDirection? _tagNameEditingCommitted and _attributeNumberEditingCommitted? I didn't notice these. However, it looks like _tagNameEditingCommitted handles moveDirection in `cancel()`, and _attributeNumberEditingCommitted ignores the parameter.
Comment on attachment 301249 [details] Patch Clearing flags on attachment: 301249 Committed r212236: <http://trac.webkit.org/changeset/212236>
All reviewed patches have been landed. Closing bug.