Yeah I was going to come back to this and clean it up. I just tweaked it
real quick to get the demo page working. I threw in the ember class check
to verify it was loading on a text area comonent.
On May 14, 2014 4:20 PM, "Wes Hather" <notifications@github.com> wrote:

> In src/jquery.autocomplete.js:
>
> >          that.text = function () {
> >              // Support for contenteditable="true"
> > -            if(that.el[0].tagName == 'INPUT')
> > +            if(that.el[0].tagName == 'INPUT' || that.el[0].className.indexOf('ember-text-area') > -1) {
>
> I added this conditional to make this autocomplete work with
> contenteditable=true which uses e.text(), not el.val(). Looks like
> everything uses .val() now.
>
> Also kind of an awkward way to check for a textarea. Does .tagName ==
> 'TEXTAREA' not work? If not, at least do a $(that.el).hasClass().
>
> Maybe just check whether contenteditable="true" is set, then use .text(),
> otherwise .val().
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/whather/jQuery-Autocomplete/pull/1/files#r12667415>
> .
>