You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also wanted to suggest, doing the binding and unbinding as a part of the 'didInsertElement' hook and the 'willDestroyElement' hook of Ember.view.
Reasoning:
Mousetrap relies on capturing a DOM element and acting on it. Having the bindings on activate of a route might cause this to fail sometimes in case the DOM has not been rendered yet.
Users can be suggested to override the Ember.view class in their applications main view.
The 'didInsertElement' of the applications main view will be called after all the other views have been rendered.
Let me know what you feel about that. If you agree, I can send a PR with the required changes
The text was updated successfully, but these errors were encountered:
I also wanted to suggest, doing the binding and unbinding as a part of the 'didInsertElement' hook and the 'willDestroyElement' hook of Ember.view.
Reasoning:
Mousetrap relies on capturing a DOM element and acting on it. Having the bindings on activate of a route might cause this to fail sometimes in case the DOM has not been rendered yet.
Users can be suggested to override the Ember.view class in their applications main view.
The 'didInsertElement' of the applications main view will be called after all the other views have been rendered.
Let me know what you feel about that. If you agree, I can send a PR with the required changes
The text was updated successfully, but these errors were encountered: