Bug 1544996 - Call setValueFromResult when autofilling the first result so that cut/copy work correctly on the autofilled value. r=dao

Bug 1541929 broke this by bypassing setValueFromResult when autofilling the first result in autofillFirstResult. setValueFromResult sets _resultForCurrentValue, so _resultForCurrentValue is null when _getSelectedValueForClipboard is called. We should call setValueFromResult in autofillFirstResult instead of calling _autofillValue directly.

Differential Revision: https://phabricator.services.mozilla.com/D28560

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Drew Willcoxon 2019-04-24 05:58:20 +00:00
parent ef43ab5278
commit cf27bc7f66

View File

@ -555,8 +555,7 @@ class UrlbarInput {
return;
}
let { value, selectionStart, selectionEnd } = result.autofill;
this._autofillValue(value, selectionStart, selectionEnd);
this.setValueFromResult(result);
}
/**