Text nodes show as clickable items in sidebar

VERIFIED FIXED in Firefox 65

Status

defect
P3
normal
VERIFIED FIXED
5 months ago
3 months ago

People

(Reporter: mbalfanz, Assigned: pbro)

Tracking

65 Branch
Firefox 65
Dependency tree / graph

Firefox Tracking Flags

(firefox65 verified)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 months ago
STR:
- visit https://www.mozilla.org/en-US/privacy/firefox/ and select "Firefox" from the top menu
- have a look at the flex items in the sidebar

ER:
- show only items as interactive that are actually interactive

AR:
- text node shows with hover color and "navigation arrow", even though it's not clickable/selectable as flex item
(Assignee)

Comment 1

5 months ago
Really it should be possible to click and select the text node within this flex container.
The problem you have discovered here is that short text nodes that are only-child of a parent element are "inlined" in the markup-view instead of shown as a different node that can be independently selected.
This was done on purpose years ago to make the markup-view look more compact. But now it's unfortunately making it impossible for us to select them and see the flex item sizing information for them.

I don't think the solution is to undo the inlining of text nodes. 
Maybe we should show the anonymous block element that is created to wrap text nodes inside flex layouts?
Or maybe we should make it possible to select an inlined text node.
(Assignee)

Comment 2

5 months ago
I'm looking at the code for this, and what seems doable is not inlining text nodes when they are flex items. We do this already for Shadow DOM slots, so it might be good to this here too.
Severity: normal → enhancement
Priority: -- → P3
Assignee: nobody → gl
Status: NEW → ASSIGNED
Assignee: gl → pbrosset
(Assignee)

Comment 3

5 months ago
This change cleans up a lot of the getCurrentDisplay's logic which was unnecessarily
complex, it seems.
It also extracts the logic to walk up the DOM to find flex/grid containers to a
reusable functions.
Finally, this new extracted function is now used in the walker to determine if a text
node can be inlined in its parent element or not.

Comment 4

5 months ago
Pushed by pbrosset@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/55d27d4a5f79
Don't inline only-child short text nodes that are also flex items; r=gl

Comment 5

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/55d27d4a5f79
Status: ASSIGNED → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
(Assignee)

Updated

4 months ago
Depends on: 1513500
Flags: qe-verify+

I reproduced this issue using 64.0a1(2018-11-16), on Windows 10 x64.
I can confirm this issue is fixed, I verified using Fx 65.0b10 on Windows 10 x64, macOS 10.13 and Ubuntu 16.04 LTS.
Cheers!

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.