mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Bug 550175 - Check if a row in an autocomplete popup is selected while pressing DEL. r=mak
This commit is contained in:
parent
c28cf72836
commit
df3aedaa70
@ -535,6 +535,12 @@ nsAutoCompleteController::HandleDelete(bool *_retval)
|
||||
|
||||
int32_t index, searchIndex, rowIndex;
|
||||
popup->GetSelectedIndex(&index);
|
||||
if (index == -1) {
|
||||
// No row is selected in the list
|
||||
HandleText();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
RowIndexToSearch(index, &searchIndex, &rowIndex);
|
||||
NS_ENSURE_TRUE(searchIndex >= 0 && rowIndex >= 0, NS_ERROR_FAILURE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user