No node is selected anymore after deleting node in dom inspector

RESOLVED FIXED

Status

Other Applications
DOM Inspector
RESOLVED FIXED
13 years ago
11 years ago

People

(Reporter: Martijn Wargers (zombie), Assigned: Martijn Wargers (zombie))

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

13 years ago
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.
(Assignee)

Comment 1

13 years ago
Created attachment 186206 [details] [diff] [review]
patch

Well, this makes the dom inspector behave like I want it to.
(Assignee)

Updated

13 years ago
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+
(Assignee)

Updated

13 years ago
Attachment #186206 - Flags: approval1.8b3?

Updated

13 years ago
Attachment #186206 - Flags: approval1.8b3? → approval1.8b3+
(Assignee)

Updated

13 years ago
Whiteboard: [checkin needed]
(Assignee)

Updated

13 years ago
Assignee: dom-inspector → martijn.martijn

Comment 3

13 years ago
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
(Assignee)

Comment 4

13 years ago
Created attachment 186535 [details] [diff] [review]
patchv2

Thanks Neil. Does this patch need to go through the whole review process again?
Attachment #186206 - Attachment is obsolete: true
(Assignee)

Comment 5

13 years ago
Neil, could you check patchv2 in? I don't think it needs to go to the whole
review process again, does it? Thanks.

Comment 6

13 years ago
Sorry, somebody already checked in patch v1.
(Assignee)

Comment 7

13 years ago
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
Last Resolved: 13 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
(Assignee)

Updated

12 years ago
Depends on: 315429
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.