Closed Bug 1114011 Opened 10 years ago Closed 10 years ago

for autocomplete with for minresultsforpopup > 1: entering match doesn't work properly

Categories

(Toolkit :: Autocomplete, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: mkmelin, Assigned: mkmelin)

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1043310 +++ For an autocomplete widget with for minresultsforpopup > 1, entering match doesn't work properly in all cases (like the test included in the patch). Thunderbird uses minresultsforpopup=2 so the result is shown inline if there is only one match.
Attachment #8539681 - Flags: review?(mak77)
Comment on attachment 8539681 [details] [diff] [review] bugXXX_minresultsforpopup_gt_1.patch Review of attachment 8539681 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/autocomplete/nsAutoCompleteController.cpp @@ +486,5 @@ > input->GetPopupOpen(&isOpen); > + // In case minresultsforpopup > 1 the popup is not "open" but the > + // search suggestion is showing inline, so if mRowCount > 0 we should > + // treat that as open too. > + if (isOpen || mRowCount > 0) { I'd prefer to restrict this a little bit, I don't trust our mRowCount management enough: // 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 minResults; input->GetMinResultsForPopup(&minResults); if (isOpen || (mRowCount > 0 && mRowCount < minResultsForPopup)) { ::: toolkit/content/tests/chrome/test_autocomplete4.xul @@ +158,5 @@ > completeFromMiddle: true, > result: "Result", > start: 6, end: 6 > }, > + { trailing space @@ +192,5 @@ > } > > function runCurrentTest() { > var autocomplete = $("autocomplete"); > + if (currentTest.minResultsForPopup != undefined) if ("minResultsForPopup" in currentTest)
Attachment #8539681 - Flags: review?(mak77) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: