RESOLVED FIXED 168120
REGRESSION(r188138): Web Inspector: cannot edit next/previous DOM attribute by using tab/shift-tab
https://bugs.webkit.org/show_bug.cgi?id=168120
Summary REGRESSION(r188138): Web Inspector: cannot edit next/previous DOM attribute b...
Blaze Burg
Reported 2017-02-10 09:42:21 PST
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
Attachments
Patch (1.54 KB, patch)
2017-02-11 01:58 PST, Matt Baker
no flags
Radar WebKit Bug Importer
Comment 1 2017-02-10 09:42:42 PST
Matt Baker
Comment 2 2017-02-11 01:50:00 PST
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;
Matt Baker
Comment 3 2017-02-11 01:58:05 PST
Joseph Pecoraro
Comment 4 2017-02-12 22:27:38 PST
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?
Matt Baker
Comment 5 2017-02-13 00:44:11 PST
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.
WebKit Commit Bot
Comment 6 2017-02-13 11:16:23 PST
Comment on attachment 301249 [details] Patch Clearing flags on attachment: 301249 Committed r212236: <http://trac.webkit.org/changeset/212236>
WebKit Commit Bot
Comment 7 2017-02-13 11:16:27 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.