Maheshjayachandran / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

Failed to display placeholder with `LabelInput` #458

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

What steps will reproduce the problem?
1. <input>
2. new goog.ui.LabelInput('foo').decorate(input);
3. compile in advance mode

What is the expected output? What do you see instead?
failed to display the placeholder, it's empty

What version of the product are you using? On what operating system?
- any version greater than r1188
- "5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like 
Gecko) Chrome/18.0.1025.165 Safari/535.19"

Please provide any additional information below.

# Solve

http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/ui/lab
elinput.js?spec=svn1188&r=1188#127

the line 

this.getElement().placeholder = this.label_;

should change to

this.getElement().setAttribute('placeholder', this.label_)

Original issue reported on code.google.com by ambar....@gmail.com on 26 Apr 2012 at 2:21

GoogleCodeExporter commented 9 years ago
I tried directly setting the placeholder in Chrome 19 beta, and it worked.

Is the property renamed by the compiler? If it is, please file a but at the 
closure-compiler project to update the html5 externs. Thanks for the 
investigation.

Original comment by pall...@google.com on 30 Apr 2012 at 7:34

GoogleCodeExporter commented 9 years ago
I see, thanks a lot

Original comment by ambar....@gmail.com on 2 May 2012 at 2:28

GoogleCodeExporter commented 9 years ago

Original comment by chrishe...@google.com on 11 May 2012 at 8:28