Closed
Bug 1185182
Opened 9 years ago
Closed 9 years ago
[UnifiedComplete] Broken completion after selecting with the keyboard, then editing
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
DUPLICATE
of bug 1185183
Tracking | Status | |
---|---|---|
firefox42 | --- | affected |
People
(Reporter: mbrubeck, Assigned: mbrubeck)
References
Details
Attachments
(1 file)
9 years ago
(deleted),
patch
|
Details | Diff | Splinter Review |
Steps to reproduce (in Firefox Nightly with browser.urlbar.unifiedcomplete enabled):
1. Begin typing a URL in the address bar.
2. Press the "down" key to select the second entry in the autocomplete list.
3. Type more letters (or backspace) to edit the URL, such that the autocomplete popup now shows a different suggestion in the second entry.
4. Press Enter.
Expected result: The URL selected in step 2 loads.
Actual result; The URL of the new second autocomplete suggestion loads, even though it is not the URL in the address bar when you press Enter.
This happens because, when unifiedcomplete is enabled, the urlbar autocomplete binding resets the selectedIndex to 0 when new autocomplete results are added...
https://hg.mozilla.org/mozilla-central/file/e7e69cc8c07b/browser/base/content/urlbarBindings.xml#l1637
...but nsAutoCompleteController's "mCompletedSelectionIndex" is still set (incorrectly) to 1, so in EnterMatch it will overwrite the user-entered value with whatever value is now at index 1:
https://hg.mozilla.org/mozilla-central/file/e7e69cc8c07b/toolkit/components/autocomplete/nsAutoCompleteController.cpp#l1339
This patch invalidates mCompletedSelectionIndex when the popup is invalidated. This fixes the problem, but I'm not sure whether it's the best fix.
This may be related to bug 1173202.
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•