1

I have in my project(written by others) handlebars template the following code snippet

{{view view.textfield propagateEvents="true"}}

I want to know what propagateEvents="true" does ?...Thanks

albertjan
  • 7,739
  • 6
  • 44
  • 74
Mudassir Ali
  • 7,913
  • 4
  • 32
  • 60
  • could you add a link to the documentation where you've read this? Shouldn't it be `Ember.TextField` I can find no reference in ember to `propagateEvents` properties. – albertjan Jul 27 '12 at 12:24
  • @albertjan try the handlebars docu? – Christoph Jul 27 '12 at 12:39
  • Yes. there isn't event _one_ javascript property or function called that on gh [see](https://github.com/search?q=propagateEvents&repo=&langOverride=&start_value=1&type=Everything&language=JavaScript) – albertjan Jul 27 '12 at 12:44
  • `view.textfield` is probably something written by the others so you should be able to see in code what it does. if you paste it here we can look for it aswel :) – albertjan Jul 27 '12 at 12:48
  • Basically, I have a view with a "textfield" property which extends Ember.TextField, it has some events such as "focusout" etc....I'm calling that textfield in my handlebars using "view.textfield". I understood all these steps except for the "propagateEvents"...Is propagateEvents related to JavaScript ? – Mudassir Ali Jul 30 '12 at 04:09
  • Have a look at what event propagation does/is: see [here](http://stackoverflow.com/questions/1522941/event-propagation-in-javascript) – albertjan Jul 30 '12 at 12:59

1 Answers1

1

Ember.Button (which I believe is being deprecated) has a propagateEvents property, but not Ember.TextField.

From the handlebars action helper documentation:

Event Propagation

Events triggered through the action helper will automatically have .preventDefault() called on them. You do not need to do so in your event handlers. To stop propagation of the event, simply return false from your handler.

If you need the default handler to trigger you should either register your own event handler, or use event methods on your view class.

albertjan
  • 7,739
  • 6
  • 44
  • 74
buuda
  • 1,427
  • 7
  • 8