Wrong element is selected in inspector after deleting an element, if whitespace text node is present

NEW
Unassigned

Status

()

Firefox
Developer Tools: Inspector
P2
normal
4 months ago
3 months ago

People

(Reporter: 684sigma, Unassigned)

Tracking

({regression})

55 Branch
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox52 wontfix, firefox53 wontfix, firefox54 fix-optional, firefox55 affected)

Details

(Reporter)

Description

4 months ago
I decided to check how Bug 1345529 was fixed, and noticed another bug in Nightly 55 (2017-04-11). It happens in earlier versions in another form. It all started after Bug 1304685.
There're two ways to reproduce the bug:

First:
1. Navigate to this url - data:text/html,<div><p><a>test1</a> <b>test2</b></p></div>
2. Open inspector, delete node <a>

Result:
Before Bug 1304685 - <b> is selected
After Bug 1304685 - no node is selected (whitespace text node is selected and then removed from inspector)
After Bug 1345529 - parent node of <a> is selected (<p>)

Expected: <b> should be selected



Second:
1. Navigate to this url - data:text/html,<div><p><a>test1</a> <b>test2</b></p></div>
2. Open inspector, delete node <b>

Result:
Before Bug 1304685 - <a> is selected
After Bug 1304685 - child nodes of parent element are removed from inspector (Bug 1345529)
After Bug 1345529 - no element is selected (whitespace text node is selected and then removed from inspector)

Expected: <a> should be selected
(Reporter)

Comment 1

4 months ago
I tracked down each change from comment #0, and mozregression-gui pointed to Bug 1304685 and Bug 1345529


https://hg.mozilla.org/integration/fx-team/pushloghtml?fromchange=687572ea20cb84f1842ad00dcc8ca1712868a361&tochange=fe1d7c28668f0eb07c2f91bd0b3b0fa635d82387
->
1304685 – Help debug spacing issues caused by whitespace text nodes
https://bugzilla.mozilla.org/show_bug.cgi?id=1304685


https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=e2bcdd1501405f8bc8e5841a06088fd3fc179878&tochange=d508a91f09e9de268da1b7831c823c6a42f16526
->
1345529 – [Regression] Partially elements may lost when remove element in Inspector
https://bugzilla.mozilla.org/show_bug.cgi?id=1345529


(Mozregression-gui 0.9.7 is broken due to Bug 1354451, consider using working 0.9.6 version)
Blocks: 1304685, 1345529
Has Regression Range: --- → yes
Has STR: --- → yes
Keywords: regression
status-firefox52: --- → affected
status-firefox53: --- → affected
status-firefox54: --- → affected
status-firefox55: --- → affected
Too late for a fix in 53.
status-firefox52: affected → wontfix
status-firefox53: affected → wontfix
status-firefox54: affected → fix-optional
With your latest fix is this fixed or not?
Flags: needinfo?(jdescottes)
No it's not fixed. The state is still:

> After Bug 1345529 - no element is selected (whitespace text node is selected and then removed from inspector)
Flags: needinfo?(jdescottes)
DevTools bug triage (filter on CLIMBING SHOES).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.