Bug 747668. (Hv1a) XPFE autocomplete.xml: Implement nsIAutoCompleteInput.textValue. r=neil.

DONTBUILD (npotb).
This commit is contained in:
Serge Gautherie 2012-05-30 20:06:17 +02:00
parent 6a1a161e57
commit f8d6daffe4

View File

@ -151,6 +151,10 @@
onget="return this.getAttribute('autocompletesearchparam') || '';" onget="return this.getAttribute('autocompletesearchparam') || '';"
onset="this.setAttribute('autocompletesearchparam', val); return val;"/> onset="this.setAttribute('autocompletesearchparam', val); return val;"/>
<property name="textValue"
onget="return this.value;"
onset="this.setTextValue(val); return val;"/>
<method name="onSearchBegin"> <method name="onSearchBegin">
<body><![CDATA[ <body><![CDATA[
this._fireEvent("searchbegin"); this._fireEvent("searchbegin");
@ -1288,9 +1292,10 @@
<method name="setTextValue"> <method name="setTextValue">
<parameter name="aValue"/> <parameter name="aValue"/>
<body><![CDATA[ <body><![CDATA[
this.value = aValue;
// Completing a result should simulate the user typing the result, // Completing a result should simulate the user typing the result,
// so fire an input event. // so fire an input event.
this.value = aValue;
var evt = document.createEvent("UIEvents"); var evt = document.createEvent("UIEvents");
evt.initUIEvent("input", true, false, window, 0); evt.initUIEvent("input", true, false, window, 0);
var oldIgnoreInput = this.ignoreInputEvent; var oldIgnoreInput = this.ignoreInputEvent;