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 lts] Pass the event parameter to sendAction #17115

Merged
merged 1 commit into from Oct 13, 2018

Conversation

ssutar
Copy link

@ssutar ssutar commented Oct 11, 2018

This fixes the regression introduced in 3.4.x, where the input actions were not passed with event object as parameter.

For example

{{input key-down="keyDown"}}

And

...
actions: {
  keyDown(value, event) {
    if (event.keyCode === SOME_KEY_CODE) {
      // DOES NOT WORK starting 3.4.x since `event` is undefined
    }
  }
}

For more details: #16989

Please note that passing actions like key-down="keyDown" is deprecated, the closure actions should be used instead like key-down=action("keyDown")

@rwjblue
Copy link
Member

rwjblue commented Oct 12, 2018

I'm not sure I follow this. We generally haven't exposed the event before, right? Why change it now?

@rwjblue
Copy link
Member

rwjblue commented Oct 12, 2018

Based on the comments in #16989 this is a regression (though it generally surprises me). We need to track down the source (and see what versions it affects).

@ssutar
Copy link
Author

ssutar commented Oct 12, 2018

From my investigation this is happening starting from 3.4.x

@ssutar ssutar changed the title [BUGFIX beta] Pass the event parameter to sendAction [BUGFIX lts] Pass the event parameter to sendAction Oct 12, 2018
@rwjblue
Copy link
Member

rwjblue commented Oct 13, 2018

Chatted with @ssutar, he tracked down the regression to #16744. /cc @cibernox

@rwjblue rwjblue merged commit 4e07100 into emberjs:master Oct 13, 2018
ssutar pushed a commit to ssutar/ember.js that referenced this pull request Oct 17, 2018
[BUGFIX lts] Pass the event parameter to sendAction
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.

None yet

2 participants