Firefox and Angular: Textarea placeholder doesn't appear until first focus

I have a super-simple Angular app:

<div ng-app> <ul> <li ng_if='true'> <textarea placeholder='Hello'></textarea> </li> </ul> </div> 

What is it. No JS / CSS.

In FF (34.0 on OSX), the placeholder in Textarea will not be displayed until the text field is focused.

What I have discovered so far:

  • It is only on textarea. Text inputs are ok.
  • This is only if it is within the scope of $ child. If ng-if not, the problem will disappear.

Play with him here .

I have no ideas. Any help would be greatly appreciated! :)

+2
angularjs firefox angularjs-scope
source share
2 answers

This is a bug in Gecko that has been resolved: https://bugzilla.mozilla.org/show_bug.cgi?id=1088158

A fix should be sent stable after a few months, but at the same time, sorry for the inconvenience.

+1
source share

This (ugly) job works.

 <div ng-app> <ul> <li ng_if='true'> <textarea placeholder='Hello'>{{''}}</textarea> </li> </ul> </div> 
0
source share

All Articles