Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX beta] Fix issue with multiple actions in a single element. #11373

Merged
merged 1 commit into from
Jun 8, 2015

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Jun 8, 2015

In prior versions of Ember multiple {{action}} helpers were not able to be attached to a single element. This was primarily due to the way that the actions were wired (via data-ember-action attribute).

That original limitation seems like a bug, and this commit enables usage of multiple actions in a single DOM element by having the private ActionManager keep its internal representation of "actions for a given action ID" as an array and iterating that array when an event occurs.


The following example is enabled after this PR:

<button {{action 'process'}} {{action 'process' on="tap"}}>Submut</button>

In prior versions of Ember multiple `{{action}}` helpers were
not able to be attached to a single element. This was primarily due
to the way that the actions were wired (via `data-ember-action`
attribute).

That original limitation seems like a bug, and this commit enables usage
of multiple actions in a single DOM element by having the
private `ActionManager` keep its internal representation of "actions for
a given action ID" as an array and iterating that array when an event
occurs.
@lukemelia
Copy link
Member

This has annoyed me for years. ✋ 5️⃣

@runspired
Copy link
Contributor

@lukemelia I don't think it annoys people as much if they don't work on mobile, but yeah, it's been since day one of using Ember for me (nearly two years now).

rwjblue added a commit that referenced this pull request Jun 8, 2015
[BUGFIX beta] Fix issue with multiple actions in a single element.
@rwjblue rwjblue merged commit cb00d37 into emberjs:master Jun 8, 2015
@rwjblue rwjblue deleted the multiple-actions branch June 8, 2015 16:56
@alexdiliberto
Copy link
Contributor

This is awesome! 🎆 👍

@laksmaria
Copy link

👍

AlfaroLore referenced this pull request in balinterdi/ember-cli-star-rating Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants