primefaces / primeui

Rich set of javascript-css only widgets
http://www.primefaces.org/primeui
278 stars 125 forks source link

puiautocomplete initialization error #220

Closed ritchiecarroll closed 8 years ago

ritchiecarroll commented 8 years ago

The autocomplete can fail during initialization when calling on('keydown.puiautocomplete'... since items array has yet to be defined.

Error: Cannot read property 'filter' of undefined on line 609

Mrtcndkn commented 8 years ago

It seems i can't replicate your issue i'm not getting any errors calling on('keydown.puiautocomplete'...

ritchiecarroll commented 8 years ago

I am having trouble replicating within fiddle - this seems to be a timing issue with lot's of other Javascript running. The pull request resolves by simply making sure the elements being used are properly initialized, here is a screen capture of the error on the line:

capture
StephenCWills commented 8 years ago

While working on the jsfiddle to reproduce this issue, we discovered the page was missing jquery-ui.css. Adding the stylesheet to the page fixed the issue so this was a false alarm.