A Flight component for capturing clicks inside and outside of a component node.
bower install --save flight-click-trap
this.after('initialize', function() {
this.enableClickTrap();
this.on('componentReceivedClick', function() {
this.enableComponent();
});
this.on('componentLostClick', function() {
this.disableComponent();
});
});
The clicktrap has a small performance overhead as it's called on every user click, so you'll likely want to disable it when your component is hidden or unused.
this.disableClickTrap()
Development of this component requires Bower, and preferably Karma to be globally installed:
npm install -g bower karma
Then install the Node.js and client-side dependencies by running the following commands in the repo's root directory.
npm install
bower install
To continuously run the tests in Chrome and Firefox during development, just run:
karma start
Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.