Bug 76058 - Web Inspector: [TextPrompt] Autocomplete adds unwanted text that's hard to remove
Summary: Web Inspector: [TextPrompt] Autocomplete adds unwanted text that's hard to re...
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-01-11 06:37 PST by Alexander Pavlov (apavlov)
Modified: 2012-01-17 11:25 PST (History)
12 users (show)

See Also:


Attachments
Patch (2.13 KB, patch)
2012-01-11 08:06 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
Patch (16.00 KB, patch)
2012-01-13 01:53 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
Patch (20.71 KB, patch)
2012-01-13 09:43 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
Patch (20.51 KB, patch)
2012-01-16 06:43 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
Patch (20.54 KB, patch)
2012-01-17 03:36 PST, 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) 2012-01-11 06:37:13 PST
What steps will reproduce the problem?
1. Open the Web Inspector
2. Type in the console: str.replace(/is/, 'was')
3. Try to type a "g" after /is/ to make it a global replace

What is the expected result?
A "g". That's it. Just a "g".

What happens instead?
The 'smart' autocomplete adds 'getComputedStyle' and it won't go away! If you backspace, you backspace the last letter of getComputedStyle, not the whole thing. If you backspace all the way back, it just adds "etComputedStyle" again. If you ESC it's gone for half a second and than it's there again.

It's not only annoying, it actually breaks functionality! The new autocomplete is a little too eager.

Upstreaming http://code.google.com/p/chromium/issues/detail?id=109518
Comment 1 Alexander Pavlov (apavlov) 2012-01-11 08:06:46 PST
Created attachment 122027 [details]
Patch
Comment 2 Pavel Feldman 2012-01-11 08:41:36 PST
Comment on attachment 122027 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        - Avoid showing suggestions when navigating through the user input.

Could you add a test that emits Right, Right, Right on various user inputs and checks that popup is never shown?

> Source/WebCore/ChangeLog:9
> +        - Don't complete the grayed (non-selected) suggestion with Right or End.

Lets wait before we do this one.
Comment 3 Alexander Pavlov (apavlov) 2012-01-13 01:53:33 PST
Created attachment 122395 [details]
Patch
Comment 4 WebKit Review Bot 2012-01-13 02:46:31 PST
Comment on attachment 122395 [details]
Patch

Attachment 122395 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11227511

New failing tests:
inspector/styles/styles-cancel-editing.html
Comment 5 Alexander Pavlov (apavlov) 2012-01-13 09:43:43 PST
Created attachment 122442 [details]
Patch

Add PageUp/PageDown handling in suggest box
Comment 6 WebKit Review Bot 2012-01-13 10:22:37 PST
Comment on attachment 122442 [details]
Patch

Attachment 122442 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11236089

New failing tests:
inspector/styles/styles-cancel-editing.html
Comment 7 Alexander Pavlov (apavlov) 2012-01-16 06:43:08 PST
Created attachment 122625 [details]
Patch

[PATCH] Fix test failure
Comment 8 Alexander Pavlov (apavlov) 2012-01-17 03:36:47 PST
Created attachment 122747 [details]
Patch
Comment 9 Alexander Pavlov (apavlov) 2012-01-17 04:14:11 PST
Committed r105140: <http://trac.webkit.org/changeset/105140>