Open Bug 1910073 Opened 2 years ago Updated 1 year ago

nsAutoCompleteController::GetValueAt() returns the label instead

Categories

(Toolkit :: Autocomplete, defect)

defect

Tracking

()

People

(Reporter: mak, Unassigned)

References

Details

NS_IMETHODIMP
nsAutoCompleteController::GetValueAt(int32_t aIndex, nsAString& _retval) {
  GetResultLabelAt(aIndex, _retval);

  return NS_OK;
}

I'm not sure why it's not using GetResultValueAt, as it is calling controller.GetValueAt() returns the label.
There's a comment at https://bugzilla.mozilla.org/show_bug.cgi?id=556007#c53 that seems to indicate this was done on purpose but eventually it should have been fixed.
I suspect it was mostly a compatibility decision for add-ons?

It's hard to tell if fixing this would break something, so it may require some testing.

See Also: → 1886064

I put a workaround in the test for bug 1909211, using getFinalCompleteValueAt instead of getValueAt.

You need to log in before you can comment on or make changes to this bug.