Closed
Bug 704521
Opened 13 years ago
Closed 13 years ago
Form history autocomplete does not work on SearchBar (general xul textbox type='autocomplete' is broken.)
Categories
(Toolkit :: Autocomplete, defect)
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: alice0775, Assigned: mounir)
References
Details
(Keywords: regression)
Attachments
(1 file)
1.45 KB,
patch
|
zpao
:
review+
mounir
:
checkin+
|
Details | Diff | Splinter Review |
Build Identifier:
http://hg.mozilla.org/mozilla-central/rev/8ceaedf06a57
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111122 Firefox/11.0a1 ID:20111122030949
Form history does not work on SearchBar.
Reproducible: Always
Steps to Reproduce:
1 Start Firefox with clean profile
2 Input a word in SearchBar and enter
3 Repeat step2 few times with different word
4 Clear the SearchBar field
5 Push Up arrow key
Actual Results:
No form history pops up
Expected Results:
Form history should pop up
Regression window(m-c)
Works;
http://hg.mozilla.org/mozilla-central/rev/78cd6a30e250
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111121 Firefox/11.0a1 ID:20111121092346
Fails:
http://hg.mozilla.org/mozilla-central/rev/9276e3274f18
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111121 Firefox/11.0a1 ID:20111121084558
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=78cd6a30e250&tochange=9276e3274f18
Regression window(m-i)
Works;
http://hg.mozilla.org/integration/mozilla-inbound/rev/6904d8f28c7d
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111120 Firefox/11.0a1 ID:20111120100259
Fails:
http://hg.mozilla.org/integration/mozilla-inbound/rev/4882413755d3
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111120 Firefox/11.0a1 ID:20111120100658
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=6904d8f28c7d&tochange=4882413755d3
![]() |
Reporter | |
Updated•13 years ago
|
Summary: Form history does not work on SearchBar → Form history autocomplete does not work on SearchBar
![]() |
Reporter | |
Comment 1•13 years ago
|
||
And Bug695014 also breaks general xul textbox type='autocomplete'.
<?xml version='1.0'?>
<?xml-stylesheet href='chrome://global/skin/' type='text/css'?>
<window id='autocompletesearch-window' title='autocompletesearch'
xmlns:html='http://www.w3.org/1999/xhtml'
xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'>
<script type='application/javascript' xmlns='http://www.w3.org/1999/xhtml'><![CDATA[
function entered(elem) {
var formHistory = Components.classes['@mozilla.org/satchel/form-history;1']
.getService(Components.interfaces.nsIFormHistory2);
formHistory.addEntry(elem.getAttribute('autocompletesearchparam'), elem.value);
}
]]></script>
<textbox type='autocomplete'
autocompletesearch='form-history'
autocompletesearchparam='test'
enablehistory='true'
ontextentered='entered(this);'/>
</window>
Steps to Reproduce:
1 Start Firefox with clean profile
2 Open Error console and Evaluete the following code.
openDialog("data:application/vnd.mozilla.xul+xml;charset=utf-8,<%3Fxml version%3D'1.0'%3F><%3Fxml-stylesheet href%3D'chrome%3A%2F%2Fglobal%2Fskin%2F'type%3D'text%2Fcss'%3F><window id%3D'autocompletesearch-window' title%3D'autocompletesearch' xmlns%3Ahtml%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml' xmlns%3D'http%3A%2F%2Fwww.mozilla.org%2Fkeymaster%2Fgatekeeper%2Fthere.is.only.xul'><script type%3D'application%2Fjavascript' xmlns%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'><![CDATA[function entered(elem) { var formHistory %3D Components.classes['%40mozilla.org%2Fsatchel%2Fform-history%3B1'].getService(Components.interfaces.nsIFormHistory2)%3BformHistory.addEntry(elem.getAttribute('autocompletesearchparam')%2C elem.value)%3B}]]><%2Fscript><textbox type%3D'autocomplete' autocompletesearch%3D'form-history' autocompletesearchparam%3D'test' enablehistory%3D'true' ontextentered%3D'entered(this)%3B'%2F><%2Fwindow>", "dlg", "");
3 Input a word in textbox and enter
4 Repeat step2 few times with different word
5 Clear the textbox field
6 Push Up arrow key OR click dropdown marker
Actual Results:
No form history pops up
Expected Results:
Form history should pop up
Summary: Form history autocomplete does not work on SearchBar → Form history autocomplete does not work on SearchBar (general xul textbox type='autocomplete' is broken.)
![]() |
Reporter | |
Updated•13 years ago
|
Component: Form Manager → Autocomplete
QA Contact: form.manager → autocomplete
Version: Trunk → 11 Branch
Comment 3•13 years ago
|
||
Mounir, can you take a look at this?
Assignee: nobody → mounir
OS: Windows 7 → All
Hardware: x86 → All
Assignee | ||
Comment 5•13 years ago
|
||
Comment on attachment 577692 [details] [diff] [review]
Patch v1
When I've been asked to check for mFocusedInput during the review request, I was assuming I had to check that it was null before call IsAutocompleteEnabled but it happens that the code was doing the opposite: mFocusedInput being null meant always showing the suggestions and this is actually used by the XUL elements...
Attachment #577692 -
Flags: review? → review?(paul)
Assignee | ||
Updated•13 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [needs review]
Comment 6•13 years ago
|
||
Comment on attachment 577692 [details] [diff] [review]
Patch v1
Review of attachment 577692 [details] [diff] [review]:
-----------------------------------------------------------------
Well, it's certainly a case for WTF, but it works. Thanks for figuring it out.
Attachment #577692 -
Flags: review?(paul) → review+
Updated•13 years ago
|
Keywords: checkin-needed
Whiteboard: [needs review]
Assignee | ||
Updated•13 years ago
|
Assignee | ||
Updated•13 years ago
|
Attachment #577692 -
Flags: checkin+
Comment 7•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•