Closed Bug 1513244 Opened 5 years ago Closed 5 years ago

Autocomplete popup should be closed on willNavigate

Categories

(DevTools :: Console, enhancement, P1)

65 Branch
enhancement

Tracking

(firefox66 fixed)

RESOLVED FIXED
Firefox 66
Tracking Status
firefox66 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(2 files)

When navigating to some places, the data in the autocomplete popup might be obsolete, so it makes sense to close it.
This also has the benefit of fixing an issue when the popup is opened, the page navigates and logs some message: the popup is now misplaced.
In order to do this, we'll move the current code that handle willNavigate to webconsole-output-wrapper, and dispatch a "WILL_NAVIGATE" action to which every reducer can react.
This will be also useful to clear the autocomplete cache (and the authorizations in Bug 1499289).
The autocomplete popup contains information about the context
it was opened in. If the context changes, the content of the
popup might be outdated, or plainly wrong.
Closing the popup seems like a safe way to handle this.
We take this as an opportunity to move the willNavigate handler
to webconsole-output-wrapper, where we can dispatch a new
WILL_NAVIGATE action to which reducers might react.
A test is added to make sure this works as expected.

Depends on D12939
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8aabc712969f
Close autocomplete navigation on page navigation; r=Honza.
The functions needed to build the autocomplete request are moved
to the serviceContainer so it can be called from everywhere in
the code, and not only from the JsTerm.
Assignee: nobody → nchevobbe
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7bfcf9cca55d
Extract fetchAutocompleteProperties from JsTerm into a Redux action; r=Honza.
https://hg.mozilla.org/integration/autoland/rev/7459e382f44c
Close autocomplete navigation on page navigation; r=Honza.
Backout by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4ab1e5be9eaa
Backed out changeset 8aabc712969f as requested by Aryx on irc
https://hg.mozilla.org/mozilla-central/rev/7bfcf9cca55d
https://hg.mozilla.org/mozilla-central/rev/7459e382f44c
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: