Last Comment Bug 705932 - Inspector should allow copying the current element's id/classes
: Inspector should allow copying the current element's id/classes
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Inspector (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: Firefox 11
Assigned To: Paul Rouget [:paul]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-28 16:25 PST by Pedro Alves
Modified: 2012-03-05 22:51 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch v1 (4.20 KB, patch)
2011-11-29 01:19 PST, Paul Rouget [:paul]
dao+bmo: review+
jwalker: feedback+
Details | Diff | Splinter Review
patch v1.1 (4.20 KB, patch)
2011-11-29 09:10 PST, Paul Rouget [:paul]
no flags Details | Diff | Splinter Review

Description Pedro Alves 2011-11-28 16:25:40 PST
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
Comment 1 Paul Rouget [:paul] 2011-11-29 01:19:43 PST
Created attachment 577515 [details] [diff] [review]
patch v1
Comment 2 Joe Walker [:jwalker] (needinfo me or ping on irc) 2011-11-29 02:15:07 PST
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?
Comment 3 Paul Rouget [:paul] 2011-11-29 02:24:38 PST
(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
Comment 4 Joe Walker [:jwalker] (needinfo me or ping on irc) 2011-11-29 03:41:26 PST
(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 5 Dão Gottwald [:dao] 2011-11-29 08:29:59 PST
Comment on attachment 577515 [details] [diff] [review]
patch v1

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

#highlighter-nodeinfobar-container[locked] > #highlighter-nodeinfobar {
Comment 6 Dão Gottwald [:dao] 2011-11-29 08:56:56 PST
Comment 5 needs to be addressed.
Comment 7 Paul Rouget [:paul] 2011-11-29 09:06:57 PST
Sorry, I missed it.
Comment 8 Paul Rouget [:paul] 2011-11-29 09:10:47 PST
Created attachment 577644 [details] [diff] [review]
patch v1.1

Addressed Dao's comment.
Comment 9 Rob Campbell [:rc] (:robcee) 2011-11-29 11:07:57 PST
https://hg.mozilla.org/integration/fx-team/rev/1e3f58d1bde7
Comment 10 Tim Taubert [:ttaubert] 2011-11-29 22:04:46 PST
https://hg.mozilla.org/mozilla-central/rev/1e3f58d1bde7
Comment 11 Pedro Alves 2011-12-12 10:27:42 PST
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
Comment 12 Pedro Alves 2011-12-15 02:21:57 PST
Working in tonight's build, thanks!
Comment 13 Paul Rouget [:paul] 2012-01-30 10:04:35 PST
This happens again (can't copy).
Comment 14 Paul Rouget [:paul] 2012-03-05 22:51:08 PST
Any idea of what going on here? See bug 722398?

Note You need to log in before you can comment on or make changes to this bug.