Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swipe stops working if DOM is changed #85

Open
lifeinafolder opened this issue Mar 15, 2017 · 0 comments
Open

swipe stops working if DOM is changed #85

lifeinafolder opened this issue Mar 15, 2017 · 0 comments

Comments

@lifeinafolder
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant