Bug 86349

Summary: Web Inspector: Esc should revert the colorpicker-modifed color to the original
Product: WebKit Reporter: Alexander Pavlov (apavlov) <apavlov>
Component: Web Inspector (Deprecated)Assignee: Alexander Pavlov (apavlov) <apavlov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch vsevik: review+

Description Alexander Pavlov (apavlov) 2012-05-14 03:23:16 PDT
1. Start editing color
2. Make an accidental modification
3. Hit Esc to cancel editing

Expected: editing canceled
Actual: editing persisted.

Upstreaming http://code.google.com/p/chromium/issues/detail?id=128010
Comment 1 Alexander Pavlov (apavlov) 2012-05-14 03:28:54 PDT
Created attachment 141679 [details]
Patch
Comment 2 Vsevolod Vlasov 2012-05-14 04:19:58 PDT
Comment on attachment 141679 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=141679&action=review

> Source/WebCore/inspector/front-end/Spectrum.js:422
> +        this.dispatchEventToListeners(WebInspector.Spectrum.Events.Hidden, !!cancelEdit);

Maybe invert this value?

> Source/WebCore/inspector/front-end/Spectrum.js:433
> +            this.hide(event.keyIdentifier === "U+001B");

Maybe use two ifs?
Comment 3 Alexander Pavlov (apavlov) 2012-05-14 04:41:23 PDT
Committed r116933: <http://trac.webkit.org/changeset/116933>