Closed
Bug 441530
Opened 16 years ago
Closed 16 years ago
Toolkit autocomplete sets the "nomatch" attribute on the popup rather than the textbox
Categories
(Toolkit :: Autocomplete, defect, P2)
Toolkit
Autocomplete
Tracking
()
RESOLVED
FIXED
mozilla1.9.1a1
People
(Reporter: standard8, Assigned: standard8)
References
()
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
enndeakin
:
review+
|
Details | Diff | Splinter Review |
See the url, when setting the "nomatch" attribute, toolkit's autocomplete sets it on the popup, rather than the textbox/autocomplete element. This basically makes the action useless as if there are no matches then there won't be a popup.
See also http://mxr.mozilla.org/seamonkey/search?string=nomatch for current uses (none).
This is needed for a nice implementation of bug 441526.
Assignee | ||
Comment 1•16 years ago
|
||
This moves the attribute setting from the popup to the main autocomplete element. Test included to ensure correct functionality. I'll probably be extending the test in bug 441526 which is why I named it generically.
Attachment #326530 -
Flags: review?
Assignee | ||
Updated•16 years ago
|
Attachment #326530 -
Flags: review? → review?(mconnor)
Comment 2•16 years ago
|
||
Comment on attachment 326530 [details] [diff] [review]
The fix and test
I won't have time to look at this soon, punting to Enn
Attachment #326530 -
Flags: review?(mconnor) → review?(enndeakin)
Assignee | ||
Updated•16 years ago
|
Priority: -- → P2
Comment 3•16 years ago
|
||
Comment on attachment 326530 [details] [diff] [review]
The fix and test
>+netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
This is a chrome test. Why are you asking for privileges throughout this test?
>+ is(autocomplete.hasAttribute("nomatch"), false);
There should be a description of the test as the third argument. Similarly for the other 'is' calls.
>+ is(autocomplete.hasAttribute("nomatch"), true);
>+ is(autocomplete.getAttribute("nomatch"), "true");
Save time and just check the second case only.
Attachment #326530 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 4•16 years ago
|
||
I addressed Neil's comments and this is what I have checked in.
Attachment #326530 -
Attachment is obsolete: true
Attachment #329304 -
Flags: review+
Assignee | ||
Comment 5•16 years ago
|
||
I checked this in earlier today and had to back it out again due to memory leaks. I think the problem was to do with how I was handling the component registration within the chrome level tests. I have an alternative way that I am currently testing.
Assignee | ||
Comment 6•16 years ago
|
||
When I checked in the previous version it turned the tinderboxes orange due to a memory leak, I investigated and it was due to having the result being created inline in the startSearch function, as http://developer.mozilla.org/en/docs/Using_XPCOM_in_JavaScript_without_leaking#Things_not_to_do suggests.
So I have moved it to outside and created it as an object, and the test no longer leaks.
Requesting review again as the test has changed slightly from what it was.
Attachment #329304 -
Attachment is obsolete: true
Attachment #329832 -
Flags: review?(enndeakin)
Assignee | ||
Updated•16 years ago
|
Attachment #329304 -
Attachment description: [checked in] The fix and test v2 → The fix and test v2
Comment 7•16 years ago
|
||
Comment on attachment 329832 [details] [diff] [review]
The fix and test v3
>+nsAutoCompleteSimpleResult.prototype = {
>+ _param: null,
Did you mean "" here?
Attachment #329832 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 8•16 years ago
|
||
(In reply to comment #7)
> (From update of attachment 329832 [details] [diff] [review])
> >+nsAutoCompleteSimpleResult.prototype = {
> >+ _param: null,
>
> Did you mean "" here?
>
Patch checked in with this fixed.
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a1
You need to log in
before you can comment on or make changes to this bug.
Description
•