Bug 62271 - Web Inspector: adding an attribute to an element with no attributes only works from second attempt
Summary: Web Inspector: adding an attribute to an element with no attributes only work...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-08 03:44 PDT by Andrey Kosyakov
Modified: 2014-12-15 22:36 PST (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2011-06-08 03:44:27 PDT
1. Navigate to data:text/html,<div>
2. Open inspector
3. Switch to elements panel
4. Double-click on <div>
5. Start entering attribute name/value, e.g. id="1"
6. Observe that the text being types also appears in closing tag
7. Press enter
8. Observe that attribute/value is replaced with empty active edit box
9. Enter attrbiute/value again
10. Press enter. Now it works.
Comment 1 Mike West 2011-07-21 01:12:40 PDT
This workflow means that you're editing the tag name rather than its attributes, which leads to the confusing behavior you've noted. One way of solving the problem would be to make the spacebar behave the same way as tab for this field.

I'm not sure that's the best solution, but it looks pretty straightforward. I'll upload a strawman patch, and if it's something we're happy with, I'll try to figure out how to test it. :)
Comment 2 Joseph Pecoraro 2011-07-21 10:08:17 PDT
I thought it was pretty obvious here that you're editing the tag name and not an attribute.
When you're on the tagname, you can just tab to start editing an attribute. In the past
we made this more clear so that when you hovered the tag, a clickable "..." region showed
up in a new attribute spot which you could click to immediately start creating a new attribute.
That later got removed in favor of the current behavior.

Is the current behavior really that confusing?