зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1572329 - Fix error that prevented the top history result from being deleted. r=mak
AFAICT this bug isn't reproducible anymore after bug 1623666. i.e., it's no longer possible to show the history view. You can still see a history-like view by typing ^ or a space, but in that case the first result is a search result, not a history result, so it can't be deleted anyway. Nevertheless we should fix this error. Differential Revision: https://phabricator.services.mozilla.com/D79576
This commit is contained in:
Родитель
f1d9bd0a46
Коммит
8c5c5746f8
|
@ -593,14 +593,15 @@ class UrlbarController {
|
|||
const selectedResult = this.input.view.selectedResult;
|
||||
if (
|
||||
!selectedResult ||
|
||||
selectedResult.source != UrlbarUtils.RESULT_SOURCE.HISTORY
|
||||
selectedResult.source != UrlbarUtils.RESULT_SOURCE.HISTORY ||
|
||||
selectedResult.heuristic
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let { queryContext } = this._lastQueryContextWrapper;
|
||||
let index = queryContext.results.indexOf(selectedResult);
|
||||
if (!index) {
|
||||
if (index < 0) {
|
||||
Cu.reportError("Failed to find the selected result in the results");
|
||||
return false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче