Bug 175409 - Web Inspector: Clicking on suggestion hint should apply it, not dismiss
Summary: Web Inspector: Clicking on suggestion hint should apply it, not dismiss
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-09 16:44 PDT by Nikita Vasilyev
Modified: 2017-08-11 15:34 PDT (History)
4 users (show)

See Also:


Attachments
[Animated GIF] Bug (22.28 KB, image/gif)
2017-08-09 16:44 PDT, Nikita Vasilyev
no flags Details
Patch (1.84 KB, patch)
2017-08-09 16:49 PDT, Nikita Vasilyev
nvasilyev: review-
nvasilyev: commit-queue-
Details | Formatted Diff | Diff
Patch (1.88 KB, patch)
2017-08-09 16:57 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
[Animated GIF] With patch applied (40.95 KB, image/gif)
2017-08-09 16:59 PDT, Nikita Vasilyev
no flags Details
Patch (1.88 KB, patch)
2017-08-11 14:44 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2017-08-09 16:44:47 PDT
Created attachment 317757 [details]
[Animated GIF] Bug

In Console prompt and Styles sidebar, clicking on the suggestion hint (the gray text), discards the suggestion hint.

It should instead apply the suggestion hint.
Comment 1 Nikita Vasilyev 2017-08-09 16:49:21 PDT
Created attachment 317758 [details]
Patch
Comment 2 Nikita Vasilyev 2017-08-09 16:53:42 PDT
Comment on attachment 317758 [details]
Patch

This doesn't in Styles.
Comment 3 Nikita Vasilyev 2017-08-09 16:57:02 PDT
Created attachment 317760 [details]
Patch
Comment 4 Nikita Vasilyev 2017-08-09 16:59:11 PDT
Created attachment 317762 [details]
[Animated GIF] With patch applied

(In reply to Nikita Vasilyev from comment #2)
> Comment on attachment 317758 [details]
> Patch
> 
> This doesn't in Styles.

This doesn't WORK in Styles.
Comment 5 Nikita Vasilyev 2017-08-09 17:15:58 PDT
To clarify, the last patch works in both console and styles.
Comment 6 Matt Baker 2017-08-11 13:47:46 PDT
Comment on attachment 317760 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js:259
> +            setTimeout(() => { this._codeMirror.focus() }, 1);

Is there a reason the delay isn't zero?
Comment 7 Nikita Vasilyev 2017-08-11 14:22:12 PDT
(In reply to Matt Baker from comment #6)
> Comment on attachment 317760 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=317760&action=review
> 
> > Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js:259
> > +            setTimeout(() => { this._codeMirror.focus() }, 1);
> 
> Is there a reason the delay isn't zero?

No reason. I see we usually use 0, I'll change it for consistency.
Comment 8 Nikita Vasilyev 2017-08-11 14:44:23 PDT
Created attachment 317966 [details]
Patch
Comment 9 Matt Baker 2017-08-11 14:51:24 PDT
Comment on attachment 317966 [details]
Patch

r=me
Comment 10 WebKit Commit Bot 2017-08-11 15:33:31 PDT
Comment on attachment 317966 [details]
Patch

Clearing flags on attachment: 317966

Committed r220614: <http://trac.webkit.org/changeset/220614>
Comment 11 WebKit Commit Bot 2017-08-11 15:33:33 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Radar WebKit Bug Importer 2017-08-11 15:34:12 PDT
<rdar://problem/33857544>