RESOLVED CONFIGURATION CHANGED 147975
REGRESSION: Web Inspector: Autocomplete sometimes requires two tab presses
https://bugs.webkit.org/show_bug.cgi?id=147975
Summary REGRESSION: Web Inspector: Autocomplete sometimes requires two tab presses
Nikita Vasilyev
Reported 2015-08-13 06:07:54 PDT
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
Devin Rousso
Comment 1 2015-08-13 10:39:00 PDT
David Kilzer (:ddkilzer)
Comment 2 2016-09-09 11:20:20 PDT
Devin Rousso
Comment 3 2016-09-10 23:39:51 PDT
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
Comment 4 2016-09-10 23:41:49 PDT
Nikita Vasilyev
Comment 5 2017-10-14 12:48:39 PDT
Fixed in the new styles sidebar: Bug 177313 - Web Inspector: Styles Redesign: hook up autocompletion to property names and values
Note You need to log in before you can comment on or make changes to this bug.