Skip to content

Commit

Permalink
Add documentation about action
Browse files Browse the repository at this point in the history
  • Loading branch information
tute committed Jul 1, 2014
1 parent c097c29 commit fbb3c6f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions source/guides/templates/actions.md
Expand Up @@ -41,6 +41,20 @@ App.PostController = Ember.ObjectController.extend({
});
```

Note that actions may be attached to any element of the DOM, but not all
respond to the `click` event. For example, if an action is attached to an `a`
link without an `href` attribute, or to a `div`, some browsers won't execute
the associated function. If it's really needed to define actions over such
elements, a CSS workaround exists to make them clickable, `cursor: pointer`.
For example:

```css
[data-ember-action] {
cursor: pointer;
}
```


### Action Bubbling

By default, the `{{action}}` helper triggers a method on the template's
Expand Down

0 comments on commit fbb3c6f

Please sign in to comment.