Bug 51476 - Web Inspector: Can't backspace from CSS value to CSS key field
Summary: Web Inspector: Can't backspace from CSS value to CSS key field
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-22 09:50 PST by Nico Weber
Modified: 2010-12-23 10:11 PST (History)
14 users (show)

See Also:


Attachments
[PATCH] Suggested solution (2.13 KB, patch)
2010-12-23 04:14 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Weber 2010-12-22 09:50:43 PST
I like the change that made CSS keys and values to different text fields. However, it made it hard to delete new rules. Repro:

1. Double-click "Element style"
2. "color" : "red" but don't hit enter
3. Change your mind, hit backspace

Expected: I'm able to backspace all the way to the left, deleting everything i wrote
Actual: Only "red" gets deleted.

The caret should move back the the key field if backspace is pressed and the caret is on the left edge of the value field.
Comment 1 Joseph Pecoraro 2010-12-22 10:18:22 PST
Thanks for the report Nico. I think many others would expect the opposite,
that backspacing would be limited to just the value. However, you have a
very good point. If the user actually types out the ":" and is jumped editing
the property to value, then they would also expect that behavior going
backwards.

The user flow I would have used didn't work as I expected:
<http://webkit.org/b/51480> Web Inspector: Tabbing from new rule with empty value should create a new property
Comment 2 Alexander Pavlov (apavlov) 2010-12-23 04:14:39 PST
Created attachment 77324 [details]
[PATCH] Suggested solution

I believe this behavior is only useful for new properties, as blurring a changed value of an existing property results in the property being committed (effectively removing the property if the value is empty), which may be far from what the user could expect. Does that sound reasonable?
Comment 3 Joseph Pecoraro 2010-12-23 09:08:01 PST
Comment on attachment 77324 [details]
[PATCH] Suggested solution

Good solution. Thanks! r=me
Comment 4 WebKit Commit Bot 2010-12-23 09:26:30 PST
Comment on attachment 77324 [details]
[PATCH] Suggested solution

Clearing flags on attachment: 77324

Committed r74562: <http://trac.webkit.org/changeset/74562>
Comment 5 WebKit Commit Bot 2010-12-23 09:26:37 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 WebKit Review Bot 2010-12-23 10:11:45 PST
http://trac.webkit.org/changeset/74562 might have broken SnowLeopard Intel Release (Tests)