Bug 71119 - Web Inspector: Using keyboard to increment/decrement units is inconsistent
Summary: Web Inspector: Using keyboard to increment/decrement units is inconsistent
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: 2011-10-28 07:46 PDT by Alexander Pavlov (apavlov)
Modified: 2011-10-31 01:37 PDT (History)
10 users (show)

See Also:


Attachments
[PATCH] Suggested fix (6.52 KB, patch)
2011-10-28 08:09 PDT, Alexander Pavlov (apavlov)
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pavlov (apavlov) 2011-10-28 07:46:12 PDT
What steps will reproduce the problem?
1. Open Web Inspector in the Elements tab
2. Enter an CSS property with a float value (1em)
3. Double click on that value and use the arrow keys (up/down) to change it.

What is the expected result?

Starting at a value of 0, arrows should change the value by 1 unit (em, px, %, etc). 
Using the arrows while pressing ALT (or Option) should change the value by 1 unit.
Using the arrows while pressing Shift should change the value by 10 units

What happens instead?

Starting at a value of 0, arrows change the value by .1 unit between "0" and "1" and then suddenly the action is modified and values increase by 1 unit after "1" is reached.

The ALT (or Option) key allows to toggle into a .1 unit modification mode from "1" to infinity. It doesn't between "0" and "1" where the roles are reversed with the normal behavior.

The following screenshot illustrates a good test case.
http://link.olivierlacan.com/BLyz

As a sidenote (which will require a separate issue), note that pixel values are incorrectly incremented as decimal numbers because of this unexpected behavior.

Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2

Upstreaming http://code.google.com/p/chromium/issues/detail?id=101947
Comment 1 Alexander Pavlov (apavlov) 2011-10-28 08:09:10 PDT
Created attachment 112866 [details]
[PATCH] Suggested fix
Comment 2 Alexander Pavlov (apavlov) 2011-10-31 01:37:54 PDT
Committed r98839: <http://trac.webkit.org/changeset/98839>