If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

unable to copy HTML selector

RESOLVED DUPLICATE of bug 987877

Status

()

Firefox
Developer Tools: Inspector
RESOLVED DUPLICATE of bug 987877
a year ago
a year ago

People

(Reporter: Dan Jacobson, Unassigned)

Tracking

48 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

a year ago
Created attachment 8785248 [details]
Cannot copy area circled in red with the mouse or any other means.

User sees HTML selector (or whatever it is called. I have circled it in red.)

User wishes to copy it.

User has no way to copy it.

There it is, sitting right in front of the user (html > body > div#...) . He cannot copy it.

The best he can do is copy the CSS selector. But that is not the same!
I understand the frustration from being unable to copy something visible, but I would first like to understand why you want to use this instead of the CSS selector.

The CSS selector will be a reliable unique selector that can be used to identify the element.
The path shown in the breadcrumbs is just an indication, but does not map uniquely to the targeted element.

For instance if you open 
> data:text/html,<div><div class=sub><div>el1</div></div><div class=sub><div>el2</div></div><div class=sub><div>el3</div></div></div>

Whether you select el1, el2 or el3, the path displayed in the breadcrumbs will remain the same.
Flags: needinfo?(jidanni)
(Reporter)

Comment 2

a year ago
All I know is lately I've been using Perl to zero in on certain items
within an HTML document,

          XML::TreePP->new( use_ixhash => 1, xml_decl => '', indent => 2 );
        for my $I (
            @{
                $tpp->parse($R1)->{html}->{body}->{main}->{div}[0]->{div}[1]
                  ->{div}->{div}
            }
          )...
and would like a way to get the paths to a certain element...
Sort of like "please tell me the Basex xpath to what I'm clicking on."
Flags: needinfo?(jidanni)
Right so you actually want the xpath of the node, which is not really what the breadcrumbs display. 

This could be an option in the "Copy" submenu of the context menu when you click on a node, would that do? 
Looks like there is already Bug 987877 logged for this, although there hasn't been much activity on the bug lately.
See Also: → bug 987877
(Reporter)

Comment 4

a year ago
Yes!
Status: UNCONFIRMED → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 987877
(Reporter)

Comment 5

a year ago
But wait: also allow copying that thing I circled in red, which is somewhat different from the xpath, in case somebody wants it too someday (and thus is sitting in front of something he cannot copy!)
You need to log in before you can comment on or make changes to this bug.