Bug 154404 - Web Inspector: Styles Sidebar focus jumps when trying to edit a color
Summary: Web Inspector: Styles Sidebar focus jumps when trying to edit a color
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
Keywords: InRadar
Depends on:
Reported: 2016-02-18 12:19 PST by Timothy Hatcher
Modified: 2016-02-18 21:26 PST (History)
9 users (show)

See Also:

Video of the Bug (11.84 MB, video/quicktime)
2016-02-18 12:19 PST, Timothy Hatcher
no flags Details
Patch (6.24 KB, patch)
2016-02-18 20:27 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2016-02-18 12:19:14 PST
Created attachment 271680 [details]
Video of the Bug

1) Inspect the Inspector
2) Click on a Rule near the top of the sidebar to give it keyboard focus
3) Scroll down to the variables section
4) Click to edit a color

Results: The fist click on the swatch fails sometimes with a small scroll jump. Subsequent clicks work, but when the color changes in the popover the sidebar jumps to the previous focus rule, closing the popover.
Expected: No scrolling and the color popover should stay open.

See attached video.
Comment 1 Radar WebKit Bug Importer 2016-02-18 12:20:25 PST
Comment 2 Timothy Hatcher 2016-02-18 12:39:57 PST
I had a heck of a time recording the video for this Tweet because of this bug. https://twitter.com/webkit/status/700412341368844288
Comment 3 Devin Rousso 2016-02-18 20:27:44 PST
Created attachment 271725 [details]
Comment 4 Devin Rousso 2016-02-18 20:29:40 PST
Comment on attachment 271725 [details]

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

> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:1308
> +        if (this._delegate && typeof this._delegate.cssStyleDeclarationTextEditorBlurActiveEditor === "function")

So I'm not really sure that "cssStyleDeclarationTextEditorBlurActiveEditor" is the right name for this function as it really only drops the previously saved section, but "cssStyleDeclarationTextEditorClearActiveSection" or "cssStyleDeclarationTextEditorForgetPreviouslyActiveSection" sound a bit unwieldy and ridiculous.
Comment 5 WebKit Commit Bot 2016-02-18 21:26:50 PST
Comment on attachment 271725 [details]

Clearing flags on attachment: 271725

Committed r196798: <http://trac.webkit.org/changeset/196798>
Comment 6 WebKit Commit Bot 2016-02-18 21:26:53 PST
All reviewed patches have been landed.  Closing bug.