Closed Bug 1407385 Opened 8 years ago Closed 8 years ago

browser.omnibox.setDefaultSuggestion truncates the last character from input

Categories

(WebExtensions :: Frontend, defect)

57 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1332942

People

(Reporter: olivier.debroqueville, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:57.0) Gecko/20100101 Firefox/57.0 Build ID: 20171005195903 Steps to reproduce: I used the following code in the background.js script for a webextension: var i = 0; // Update the suggestions whenever the input is changed browser.omnibox.onInputChanged.addListener((input, suggest) => { console.log(i + " " + input); if (input.indexOf(" ") > 0) { let suggestion = buildSuggestion(input); console.log(suggestion); if (suggestion.length === 1) { suggest(suggestion); browser.omnibox.setDefaultSuggestion({description: suggestion[0].description}); } } i++; }); Actual results: browser.omnibox.setDefaultSuggestion({description: suggestion[0].description}); was systematically one character behind the first line rendered by suggest(suggestion); The last character is truncated and doesn't appear in the default suggestion. Expected results: The description should be identical in both: browser.omnibox.setDefaultSuggestion({description: suggestion[0].description}); and the first line of suggest(suggestion);
Component: Untriaged → WebExtensions: Frontend
Product: Firefox → Toolkit
Thanks for spotting the duplicate Smile4ever.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: