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.