Closed
Bug 1510422
Opened 6 years ago
Closed 6 years ago
Autocomplete stops working after typing await statement
Categories
(DevTools :: Console, defect, P1)
DevTools
Console
Tracking
(firefox-esr60 unaffected, firefox64 unaffected, firefox65 fixed)
RESOLVED
FIXED
Firefox 65
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox64 | --- | unaffected |
firefox65 | --- | fixed |
People
(Reporter: Harald, Assigned: nchevobbe)
References
Details
(Keywords: regression)
Attachments
(2 files)
STR: - Type `await navig` in Console ER: Autocomplete dialog for `navigator` AR: No autocomplete showing up Pressing space and backspace after the STR triggers the autocomplete; so something within the state handling is off after await.
Assignee | ||
Comment 1•6 years ago
|
||
Probably caused by Bug 1462394 (was working in 64)
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Depends on: 1462394
Keywords: regression
Priority: -- → P1
Assignee | ||
Comment 2•6 years ago
|
||
In Bug 1462394, we moved the autocomplete data handling out of the JsTerm to the Redux store. In the process, we regress some cases like `await n`, which should display `navigator`, but isn't anymore when the user types the whole sequence. Ctrl+Space would still show the popup, which indicates that the issue is not on the server-side. This issue is caused because our new code decides that we should hit the cache when typing the `n`, and there's nothing in the cache. Previously, we were clearing the cache as soon as the input last string wasn't alphanumeric, which we don't anymore. To fix that, instead of relying on the last string of the input (which could be wrong in cases like `x.["hello `), we clear the cache when the autocomplete service returns a null `matches` property. In the JsPropertyProvider, we use to return null whenever there isn't any search done (incorrect input, empty match prop, …). So it seems like a good idea to bust the cache when the server returns null. This requires some changes to the autocomplete service, as well as some in jsPropertyProvider (e.g. to handle `await `). Tests are added both on the client and the frontend to make sure we don't regress this (those tests fail without the actual fix).
Assignee | ||
Comment 3•6 years ago
|
||
Here's a TRY push with the patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=774922e363f2dde7892a76853575fe0467f459fc (I only modified the commit summary before pushing to phabricator)
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/85dab0b93689 Fix autocomplete cache handling; r=Honza.
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/85dab0b93689
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Updated•5 years ago
|
Blocks: 1462394
status-firefox64:
--- → unaffected
status-firefox-esr60:
--- → unaffected
No longer depends on: 1462394
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•