Skip to content

Instantly share code, notes, and snippets.

@nt1m
Last active June 11, 2019 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nt1m/9970138f93838f1b0beb91b43313a488 to your computer and use it in GitHub Desktop.
Save nt1m/9970138f93838f1b0beb91b43313a488 to your computer and use it in GitHub Desktop.
Autocomplete CE changes
* Import CE
* Change the relevant extends
* Manually set autocomplete="off"
* this.inputField --> super
* Remove appended markup
* Replace the popupset
* crop() attribute
* focused() attribute
* _setValueInternal method (everything involving inputField)
* selectTextRange method
* textValue() attribute
* Remove value() attribute
* this.mController.input = this.getCustomInterfaceCallback(Ci.nsIAutoCompleteInput);
* Remove:
```
if (aEvent.target.localName != "textbox")
return true; // Let child buttons of autocomplete take input
```
*
```
if (!this._popupset) {
this._popupset = document.createXULElement("popupset");
document.documentElement.appendChild(this._popupset);
}
this._popupset.appendChild(popup);
```
* Remove onBeforeValueSet
* Replace this with this.nsIAutoCompleteInput where needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment