Bug 86349 - Web Inspector: Esc should revert the colorpicker-modifed color to the original
Summary: Web Inspector: Esc should revert the colorpicker-modifed color to the original
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: 2012-05-14 03:23 PDT by Alexander Pavlov (apavlov)
Modified: 2012-05-14 04:41 PDT (History)
10 users (show)

See Also:


Attachments
Patch (4.64 KB, patch)
2012-05-14 03:28 PDT, Alexander Pavlov (apavlov)
vsevik: 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) 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>