Hi Ignacio, 

thanks for your patience, Some update on my debugging....

I'm glad the example is similar to your needs. The problems looks 
> related to Javascript events: the new input fields are not detected when 
> you type something. 
>
I leaned some Firebug and FireQuery debugging today because I wanted to 
hunt the JQuery events.
(I was used to Chrome stuff up to now. Cool tools.)

An event is triggered, but this.$element.val is not filled in this.query = 
this.$element.val() in bootstrap-typeahead.js in line 85
and even if I fill the DOM element, it doesn't help. That's my first 
indicator.

- Are you using turbolinks or any other interesting JS library? 
>
No annd I now disabled all stuff that is not necessary.  

- If you open the JS console (Firebug/Chrome dev tools), do you see any 
> error when clicking the "+" button? 
>

No, when I set a Breakpoint in Chrome in 
hjq-typeahead in 13/14 

     this.typeahead(opts);
     debugger;

and I load the page I get 

this 
[
   
   1. <input autocomplete="off" class="input-xlarge 
   input_many_template_input" data-minlength="1" data-provide="typeahead" 
   data-rapid="
   
{"typeahead":{"options":{},"events":{},"completer_path":"/admin/products/complete_name?locale=de"}}
   " name="product[productrelations][-1][related_product]" rows="7" 
   type="text" value disabled>

]
this
[
   
   1. <input autocomplete="off" class="input-xlarge" data-minlength="1" 
   data-provide="typeahead" data-rapid="
   
{"typeahead":{"options":{},"events":{},"completer_path":"/admin/products/complete_name?locale=de"}}
   " name="product[productrelations][0][related_product]" rows="7" type
   ="text" value="Polycom SoundStation Subwoofer">

]
event.returnValue is deprecated. Please use the standard 
event.preventDefault() instead. 
jquery.js?body=1:5387<http://10.0.0.201:3000/assets/jquery.js?body=1>
this
[
   
   1. <input autocomplete="off" class="input-xlarge" data-minlength="1" 
   data-provide="typeahead" data-rapid="
   
{"typeahead":{"options":{},"events":{},"completer_path":"/admin/products/complete_name?locale=de"}}
   " name="product[productrelations][1][related_product]" rows="7" type
   ="text" value>

]
The first is thetemplate, the second the working "old" element the third 
the "new" element ... so the registerting seems to be fine. The warning I 
find interesting JQuery is version v1.10.0. Maybe I"ll try an update 
tomorrow.
 

> - I see you have several input-many in the same page. Does it work if 
> you only have one (commenting the rest)? 
>
No, same behviour, I went down to one now for debugging.

I'll continue to debug tomorrow.
Bye,
Stefan


-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to