Comments (4)
Yes, works with Ember 2.x and actions
from ember-cli-fastclick.
Ok, still seems slow to me somehow. Any idea how I can confirm if it's working for me correctly?
from ember-cli-fastclick.
I just tried it out in the lib's dummy app by adding a button which triggers a route action.
index.hbs
<button type="button" name="button" {{action 'logClick'}}>
Click me!
</button>
index.js
import Ember from 'ember';
export default Ember.Route.extend({
actions: {
logClick() {
window.console.log('Clicked');
}
}
});
Opening the app in Chrome, browsing through the sources, you will find the FastClick library in localhost:4200/assets/bower_components/fastclick/lib/fastclick.js
. The method where the magic happens is onTouchEnd()
. I just placed a breakpoint in line 606, in the following if
block:
// localhost:4200/assets/bower_components/fastclick/lib/fastclick.js
if (!this.needsClick(targetElement)) {
event.preventDefault();
this.sendClick(targetElement, event);
}
When activating Emulate touch screen in the Developer Tools, execution stops at the breakpoint. When it is disabled, it does not stop, thus the click event is handled by the browser and not FastClick.
That is the way you can confirm, that it is working. At least, that is, what I just found out. Looked into how to confirm it is working for the first time. Before I luckily could always feel the difference.
from ember-cli-fastclick.
Awesome, tnx!
from ember-cli-fastclick.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-fastclick.