Skip to content

Instantly share code, notes, and snippets.

@ro0gr
Created June 14, 2018 12:13
Show Gist options
  • Save ro0gr/acd050d642f92e3ed35620b8b3f7eefa to your computer and use it in GitHub Desktop.
Save ro0gr/acd050d642f92e3ed35620b8b3f7eefa to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
mouseWheel(e) {
if (document.hasFocus(e.target)) {
e.preventDefault()
}
}
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
{{my-component}}
{{yield}}
<input type="number" onwheel={{action "mouseWheel"}}>
{
"version": "0.14.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js",
"ember": "2.18.2",
"ember-template-compiler": "2.18.2",
"ember-testing": "2.18.2"
},
"addons": {
"ember-data": "2.18.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment