Closed Bug 912372 Opened 11 years ago Closed 11 years ago

[markup view] Empty tags should not be expandable in the tree

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: bgrins, Assigned: pbro)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

If you click on a script or link tag with no content inside of the markup view, there is no twisty arrow by it to expand, but if you press the right arrow it will expand anyway.  It should not do this.
Depends on: 855523
This short patch seems to fix it. Do you think this is right?
Assignee: nobody → mjh563
Status: NEW → ASSIGNED
Attachment #799776 - Flags: review?(paul)
Attachment #799776 - Flags: review?(paul) → feedback?(bgrinstead)
Comment on attachment 799776 [details] [diff] [review]
patch: only expand containers that have children

Review of attachment 799776 [details] [diff] [review]:
-----------------------------------------------------------------

This looks good to me, but pbrosset should have a look at it, as he may have some related work in Bug 855523
Attachment #799776 - Flags: feedback?(pbrosset)
Attachment #799776 - Flags: feedback?(bgrinstead)
Attachment #799776 - Flags: feedback+
I think it makes more sense to add this logic at the `_onKeyDown` level:

  ...
  case Ci.nsIDOMKeyEvent.DOM_VK_RIGHT:
    if (!this._selectedContainer.expanded && this._selectedContainer.hasChildren) {
      this._expandContainer(this._selectedContainer);
    }
  ...

I've had cases where the promise returned by `this._updateChildren(aContainer, true)` wasn't waiting for children to be ready, and therefore the `if (this.hasChildren)` in your code wouldn't expand on these nodes.

For information, the markup-view will change quite a lot when bug 855523 lands, so we might want to hold back a bit for this one.
OK, so it seems as though I was a bit premature with the patch. :)

Unassigning myself for now.
Assignee: mjh563 → nobody
Status: ASSIGNED → NEW
Assignee: nobody → pbrosset
I confirm that this bug has been fixed via bug 855523 which just landed.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Attachment #799776 - Flags: feedback?(pbrosset)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: