Yes, that fixed it for me too.

I wouldn't have guessed that would have impacted the event handing either.

Thanks both for taking the time to help :)


On Tuesday, 4 March 2014 00:44:47 UTC+11, Jan Honza Odvarko wrote:
>
>
>
> On Saturday, March 1, 2014 10:55:52 AM UTC+1, Dan wrote:
>>
>> Hi,
>>
>> I'm creating a Firebug extension and struggling with domplate events.
>>
>> Given 2 separate elements, each with a separate onclick handler, the same 
>> handler (onBtnOneClick) is called for both elements.
>>
>> Sure, I could check the event.target, but the ui is going to get a lot 
>> more complicated than this, and surely I should be able to attach different 
>> handlers to different elements?
>>
>> See the template (some of it) below.
>>
>> FYI, if I delete btnOne, then onBnTwoClick is called when btnTwo is 
>> clicked.
>>
>> Is this a bug, expected behaviour, or am I doing something else wrong? 
>>
>> var MyPlate = domplate({
>>
>>     ui: 
>>         TABLE({"class" : "stretch"}, 
>>
>
> You are missing TBODY element (Domplate requires that)
>
> Does it help?
>
> Honza
>
>
>  
>
>>             TR(
>>                 TD({"class" : "fit nowrap"},
>>                     
>>                     A({"class" : "btn flush", "id" : "btnOne", onclick : 
>> "$onBtnOneClick"}, 
>>                         SPAN({"class" : "icon one"}),
>>                         " One"
>>                     ),
>>
>>                     A({"class" : "btn", "id" : "btnTwo", onclick : 
>> "$onBtnTwoClick"}, 
>>                         SPAN({"class" : "icon select"}),
>>                         " Two"
>>                     )
>>                 ),
>>  ......
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" 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/firebug.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/firebug/3d422fff-17d5-4bfb-b9db-ac16e8ac0c13%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to