mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1114011 - for autocomplete with for minresultsforpopup > 1: entering match doesn't work properly. r=mak
This commit is contained in:
parent
b6760aec97
commit
f25d7e95ef
@ -484,7 +484,13 @@ nsAutoCompleteController::HandleKeyNavigation(uint32_t aKey, bool *_retval)
|
||||
// The user hit a text-navigation key.
|
||||
bool isOpen = false;
|
||||
input->GetPopupOpen(&isOpen);
|
||||
if (isOpen) {
|
||||
|
||||
// If minresultsforpopup > 1 and there's less matches than the minimum
|
||||
// required, the popup is not open, but the search suggestion is showing
|
||||
// inline, so we should proceed as if we had the popup.
|
||||
uint32_t minResultsForPopup;
|
||||
input->GetMinResultsForPopup(&minResultsForPopup);
|
||||
if (isOpen || (mRowCount > 0 && mRowCount < minResultsForPopup)) {
|
||||
int32_t selectedIndex;
|
||||
popup->GetSelectedIndex(&selectedIndex);
|
||||
bool shouldComplete;
|
||||
|
@ -159,6 +159,14 @@ const tests = [
|
||||
result: "Result",
|
||||
start: 6, end: 6
|
||||
},
|
||||
{
|
||||
desc: "RIGHT key w/ minResultsForPopup=2",
|
||||
key: "VK_RIGHT",
|
||||
removeSelection: false,
|
||||
minResultsForPopup: 2,
|
||||
result: "Result",
|
||||
start: 6, end: 6
|
||||
},
|
||||
];
|
||||
|
||||
function nextTest() {
|
||||
@ -185,6 +193,11 @@ function nextTest() {
|
||||
|
||||
function runCurrentTest() {
|
||||
var autocomplete = $("autocomplete");
|
||||
if ("minResultsForPopup" in currentTest)
|
||||
autocomplete.setAttribute("minresultsforpopup", currentTest.minResultsForPopup)
|
||||
else
|
||||
autocomplete.removeAttribute("minresultsforpopup");
|
||||
|
||||
autocomplete.focus();
|
||||
|
||||
if (!currentTest.completeFromMiddle) {
|
||||
|
Loading…
Reference in New Issue
Block a user