Changeset 196362 in webkit
- Timestamp:
- Feb 9, 2016 10:02:53 PM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r196348 r196362 1 2016-02-09 Joseph Pecoraro <pecoraro@apple.com> 2 3 Regression: Web Inspector: Sometimes in Elements panel two elements showed as selected at the same time 4 https://bugs.webkit.org/show_bug.cgi?id=149742 5 <rdar://problem/24492481> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Views/DOMTreeElement.js: 10 (WebInspector.DOMTreeElement.prototype.moveChild): 11 Since removing and re-adding this tree element may forgot its 12 entire child tree, re-select the selected child that may have 13 just been lost in the shuffle. 14 15 * UserInterface/Views/TreeOutline.js: 16 (WebInspector.TreeOutline.prototype._forgetTreeElement): 17 When forgetting the selected tree element, also deselect the 18 forgotten tree element so it clears its selected state. 19 1 20 2016-02-09 Joseph Pecoraro <pecoraro@apple.com> 2 21 -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js
r196275 r196362 333 333 moveChild(child, targetIndex) 334 334 { 335 var wasSelected = child.selected; 335 // No move needed if the child is already in the right place. 336 if (this.children[targetIndex] === child) 337 return; 338 339 var originalSelectedChild = this.treeOutline.selectedTreeElement; 340 336 341 this.removeChild(child); 337 342 this.insertChild(child, targetIndex); 338 if (wasSelected) 339 child.select(); 343 344 if (originalSelectedChild !== this.treeOutline.selectedTreeElement) 345 originalSelectedChild.select(); 340 346 } 341 347 -
trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js
r195303 r196362 363 363 _forgetTreeElement(element) 364 364 { 365 if (this.selectedTreeElement === element) 365 if (this.selectedTreeElement === element) { 366 element.deselect(true) 366 367 this.selectedTreeElement = null; 368 } 367 369 if (this._knownTreeElements[element.identifier]) 368 370 this._knownTreeElements[element.identifier].remove(element, true);
Note: See TracChangeset
for help on using the changeset viewer.