Bug 20281

Summary: DOM attribute editing should be triggered on double-click (not single click)
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web Inspector (Deprecated)Assignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed patch aroben: review+

Description Timothy Hatcher 2008-08-04 17:22:11 PDT
Currently DOM attribute editing is triggered with a single click after the element is selected. Many times I have entered editing mode on accident and find it annoying. We should make it happen on double-click like the style editing.
Comment 1 Adam Roben (:aroben) 2008-08-04 18:49:42 PDT
(In reply to comment #0)
> We should make it happen on double-click like the style editing.

Double-clicking already has a meaning in the DOM tree: it re-roots the tree on the element you double-clicked. We've also gotten complaints that double-click-to-edit in the Styles pane is hard to discover compared to Firebug's single-click-to-edit. So I'm not sure that making this change would be a definite win.

See bug 17224 for more discussion about single- vs. double-click.
Comment 2 Timothy Hatcher 2008-08-05 08:21:20 PDT
Created attachment 22654 [details]
Proposed patch
Comment 3 Timothy Hatcher 2008-08-05 08:27:48 PDT
(In reply to comment #1)
> (In reply to comment #0)
> > We should make it happen on double-click like the style editing.
> 
> Double-clicking already has a meaning in the DOM tree: it re-roots the tree on
> the element you double-clicked. We've also gotten complaints that
> double-click-to-edit in the Styles pane is hard to discover compared to
> Firebug's single-click-to-edit. So I'm not sure that making this change would
> be a definite win.
> 
> See bug 17224 for more discussion about single- vs. double-click.

We are already doing different things for double-click. In TOT, when double-clicking a DOM attribute we stay in the editing mode that was started with the first click. So you already have to double click the empty space or the tag name.

I also wasn't the only one to voice concern for the single click to edit behavior in bug 17224. Matt Lilek (pewtermoose) also thought it would be annoying.

I think this is just one case where we are different than Firebug. I can't really think of any other single-click-to-edit designs.
Comment 4 Adam Roben (:aroben) 2008-08-05 13:47:49 PDT
Comment on attachment 22654 [details]
Proposed patch

r=me
Comment 5 Timothy Hatcher 2008-08-05 15:34:26 PDT
Landed in r35576.