Closed Bug 297660 Opened 19 years ago Closed 19 years ago

No node is selected anymore after deleting node in dom inspector

Categories

(Other Applications :: DOM Inspector, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: martijn.martijn)

References

Details

Attachments

(1 file, 1 obsolete file)

When deleting a node in the dom inspector, I would expect that the next
available node would be selected.
Now, when I want to remove a whole row of nodes, I have to manually select
afterwards I have deleted a node with the dom inspector.
Attached patch patch (obsolete) — Splinter Review
Well, this makes the dom inspector behave like I want it to.
Attachment #186206 - Flags: review?(bzbarsky)
Comment on attachment 186206 [details] [diff] [review]
patch

Looks reasonable!  I won't be able to check in until July, but let me know if
this still needs checkin at that point?
Attachment #186206 - Flags: superreview+
Attachment #186206 - Flags: review?(bzbarsky)
Attachment #186206 - Flags: review+
Attachment #186206 - Flags: approval1.8b3?
Attachment #186206 - Flags: approval1.8b3? → approval1.8b3+
Whiteboard: [checkin needed]
Assignee: dom-inspector → martijn.martijn
Comment on attachment 186206 [details] [diff] [review]
patch

>+      var selectNode = this.nextSibling;
>+      if (!selectNode) selectNode = node.previousSibling;
>+      if (!selectNode) selectNode = this.parentNode;
Nit: since JS's || operator works like Perl's, you can use e.g.
node.nextSibling || node.previousSibling || node.parentNode
Attached patch patchv2Splinter Review
Thanks Neil. Does this patch need to go through the whole review process again?
Attachment #186206 - Attachment is obsolete: true
Neil, could you check patchv2 in? I don't think it needs to go to the whole
review process again, does it? Thanks.
Sorry, somebody already checked in patch v1.
Ah, ok, thanks. I see that timeless checked it in.
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=dom.js&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=all&mindate=&maxdate=&cvsroot=%2Fcvsroot
Ok, this is fixed then.
That "node.nextSibling || node.previousSibling || node.parentNode" would be
nice, but is not that important.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Depends on: 315429
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: