Bug 147975
Summary: | REGRESSION: Web Inspector: Autocomplete sometimes requires two tab presses | ||
---|---|---|---|
Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> |
Component: | Web Inspector | Assignee: | Devin Rousso <hi> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | graouts, inspector-bugzilla-changes, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=147720 https://bugs.webkit.org/show_bug.cgi?id=147316 https://bugs.webkit.org/show_bug.cgi?id=150493 |
Nikita Vasilyev
Steps:
1. Type "document.body.fir" in the console
2. Press Tab
Expected:
"fir" is replaced with "first", the least common prefix.
firstElementChild
firstChild
document.body.first|
Actual:
Nothing happens on first Tab press
firstElementChild
firstChild
document.body.fir|
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Devin Rousso
This is a regression from https://bugs.webkit.org/show_bug.cgi?id=147316.
David Kilzer (:ddkilzer)
<rdar://problem/28228742>
Devin Rousso
This is actually regular behavior. The issue is that r187708 <webkit.org/b/147316> changed the logic for adding autocompletion hints from using CodeMirror.replaceRange to CodeMirror.setUniqueBookmark. What this means is that when you hit tab on "document.body.fir|", it will complete to "document.body.first|", but since it uses CodeMirror.setUniqueBookmark (that we fully control styling over), the added text isn't committed (which means it doesn't get syntax highlighting and doesn't effect the current text in any way). Using CodeMirror.replaceRange caused the text of the CodeMirror instance to change, which triggered a change to the stylesheet itself (which is also why r191419 <webkit.org/b/147720> was filed), which then updated CodeMirror and the syntax highlighting, causing you to see that the "st" after "document.body.fir|" changed colors (meaning it was autocompleted). This should be fixed by <webkit.org/b/150493>.
Devin Rousso
(In reply to comment #3)
Oops... Guess the link highlighting doesn't work without a scheme.
> r187708 <webkit.org/b/147316>
https://webkit.org/b/147316
> r191419 <webkit.org/b/147720>
https://webkit.org/b/147720
> <webkit.org/b/150493>
https://webkit.org/b/150493
Nikita Vasilyev
Fixed in the new styles sidebar:
Bug 177313 - Web Inspector: Styles Redesign: hook up autocompletion to property names and values