Skip to content

Commit 2bb530c

Browse files
committed
Fix #84: Placeholder is gone from yourlabs.Autocomplete, use input attr instead
1 parent 276254d commit 2bb530c

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

autocomplete.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Let's establish the vocabulary used in this script, so that we speak the
1010
same language:
1111
1212
- The text input element is "input",
13-
- The default text in the input is "placeholder",
1413
- The box that contains a list of choices is "box",
1514
- Each result in the "autocomplete" is a "choice",
1615
- With a capital A, "Autocomplete", is the class or an instance of the
@@ -138,9 +137,6 @@ yourlabs.Autocomplete = function (input) {
138137
// purposes.
139138
this.value = '';
140139

141-
// When the input is empty, show this text.
142-
this.placeholder = 'type your search here';
143-
144140
/*
145141
It is possible to wait until a certain number of characters have been
146142
typed in the input before making a request to the server, to limit the
@@ -252,9 +248,6 @@ the constructor, setup is done in this method. This allows to:
252248
- and *then* setup the instance.
253249
*/
254250
yourlabs.Autocomplete.prototype.initialize = function() {
255-
// Set the HTML placeholder attribute on the input.
256-
this.input.attr('placeholder', this.placeholder);
257-
258251
this.input
259252
.on('blur.autocomplete', $.proxy(this.inputBlur, this))
260253
.on('click.autocomplete', $.proxy(this.inputClick, this))

0 commit comments

Comments
 (0)