ember-gestures
ember-gestures copied to clipboard
swipe stops working if DOM is changed
I have a component like the following:
import Ember from 'ember';
import RecognizerMixin from 'ember-gestures/mixins/recognizers';
export default Ember.Component.extend(RecognizerMixin, {
recognizers: 'swipe',
isContentInViewport: false,
swipeRight() {
this.set('isContentInViewport', true);
},
swipeLeft() {
this.set('isContentInViewport', true);
}
});
<div class="{{if isContentInViewport 'is-content-in-viewport'}} content">
<div class="title">{{page.title}}</div>
</div>
The first swipe works perfectly. However, after the first swipe and as soon as I set the property which leads to a DOM re-render, swipe stops working.
What am I missing?