Inspector should allow copying the current element's id/classes

RESOLVED FIXED in Firefox 11

Status

()

Firefox
Developer Tools: Inspector
--
enhancement
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Pedro Alves, Assigned: paul)

Tracking

Trunk
Firefox 11
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Use case: I'm finding the elements I want to style with the inspector. I want to copy the selected element's id and class to my CSS code. The inspector doesn't allow me to do that and I need to manually type them


Would be great to have the ability either to select the text or copy it to the clipboard somehow
(Assignee)

Comment 1

6 years ago
Created attachment 577515 [details] [diff] [review]
patch v1
Assignee: nobody → paul
Status: NEW → ASSIGNED
Attachment #577515 - Flags: feedback?(jwalker)
Comment on attachment 577515 [details] [diff] [review]
patch v1

Review of attachment 577515 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/base/content/highlighter.css
@@ +69,5 @@
> +
> +#highlighter-nodeinfobar-id,
> +.highlighter-nodeinfobar-class,
> +#highlighter-nodeinfobar-tagname {
> +  -moz-user-select: text;

My understanding is that this is the default. I can't see anywhere else in highlighter.css where moz-user-select would be set to something else, but I'll assume this is needed?
Attachment #577515 - Flags: feedback?(jwalker) → feedback+
(Assignee)

Comment 3

6 years ago
(In reply to Joe Walker from comment #2)
> Comment on attachment 577515 [details] [diff] [review] [diff] [details] [review]
> patch v1
> 
> Review of attachment 577515 [details] [diff] [review] [diff] [details] [review]:
> -----------------------------------------------------------------
> 
> ::: browser/base/content/highlighter.css
> @@ +69,5 @@
> > +
> > +#highlighter-nodeinfobar-id,
> > +.highlighter-nodeinfobar-class,
> > +#highlighter-nodeinfobar-tagname {
> > +  -moz-user-select: text;
> 
> My understanding is that this is the default.

Not in XUL: http://mxr.mozilla.org/mozilla-central/source/toolkit/content/xul.css#15
(Assignee)

Updated

6 years ago
Attachment #577515 - Flags: review?(dao)
(In reply to Paul Rouget [:paul] from comment #3)
> (In reply to Joe Walker from comment #2)
> > > +  -moz-user-select: text;
> > 
> > My understanding is that this is the default.
> 
> Not in XUL:
> http://mxr.mozilla.org/mozilla-central/source/toolkit/content/xul.css#15

Duh - I didn't think that this might be XUL. Thanks.
Comment on attachment 577515 [details] [diff] [review]
patch v1

>+#highlighter-nodeinfobar-container[locked] #highlighter-nodeinfobar {

#highlighter-nodeinfobar-container[locked] > #highlighter-nodeinfobar {
Attachment #577515 - Flags: review?(dao) → review+

Updated

6 years ago
OS: Mac OS X → All
Hardware: x86 → All
Version: 11 Branch → Trunk

Updated

6 years ago
Severity: normal → enhancement
(Assignee)

Updated

6 years ago
Whiteboard: [land-in-fx-team]
Comment 5 needs to be addressed.
Whiteboard: [land-in-fx-team]
(Assignee)

Comment 7

6 years ago
Sorry, I missed it.
(Assignee)

Comment 8

6 years ago
Created attachment 577644 [details] [diff] [review]
patch v1.1

Addressed Dao's comment.
https://hg.mozilla.org/integration/fx-team/rev/1e3f58d1bde7
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/1e3f58d1bde7
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 11
(Reporter)

Comment 11

6 years ago
Dunno if it's a regression or I just never tested it, but I can select the test (in OSX) but not copy to clipboard
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Reporter)

Comment 12

6 years ago
Working in tonight's build, thanks!
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
(Assignee)

Comment 13

6 years ago
This happens again (can't copy).
(Assignee)

Comment 14

6 years ago
Any idea of what going on here? See bug 722398?
You need to log in before you can comment on or make changes to this bug.