Skip to content

Instantly share code, notes, and snippets.

@welzie
Created January 27, 2017 23:09
Show Gist options
  • Save welzie/a2cee9abd63a7400124e2745a7820cf8 to your computer and use it in GitHub Desktop.
Save welzie/a2cee9abd63a7400124e2745a7820cf8 to your computer and use it in GitHub Desktop.
prevent input click propogation
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
alert() {
window.alert('clicked me');
}
}
});
<div style="border: 1px solid red; padding: 10px;" {{action "alert"}}>
I don't want the click into the input to trigger the div onlick. Help!<br/>
{{input bubbles=false}}
</div>
{
"version": "0.11.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.10.2",
"ember-data": "2.11.0",
"ember-template-compiler": "2.10.2",
"ember-testing": "2.10.2"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment