Skip to content

Instantly share code, notes, and snippets.

@mixonic
Last active December 18, 2015 01:09
Show Gist options
  • Save mixonic/5701790 to your computer and use it in GitHub Desktop.
Save mixonic/5701790 to your computer and use it in GitHub Desktop.
diff --git a/packages/list-view/lib/list_view_mixin.js b/packages/list-view/lib/list_view_mixin.js
index 2148cf9..6b8bb74 100644
--- a/packages/list-view/lib/list_view_mixin.js
+++ b/packages/list-view/lib/list_view_mixin.js
@@ -214,6 +214,10 @@ Ember.ListViewMixin = Ember.Mixin.create({
endingIndex = min(maxContentIndex, visibleEndingIndex);
this.trigger('scrollYChanged', y);
+ console.log('start');
+ var el = this.$('.ember-list-scrolling-view')
+ if (el) { el.css({position: 'relative'}) }
+ this.finishScrollingAfterInactivity();
if (startingIndex === this._lastStartingIndex &&
endingIndex === this._lastEndingIndex) {
@@ -227,6 +231,16 @@ Ember.ListViewMixin = Ember.Mixin.create({
}, this);
},
+ finishScrollingAfterInactivity: function(){
+ Em.run.backburner.debounce(this, this.finishScrolling, 250);
+ },
+
+ finishScrolling: function(){
+ console.log('finish');
+ var el = this.$('.ember-list-scrolling-view')
+ if (el) { el.css({position: ''}) }
+ },
+
childViewsWillSync: Ember.K,
childViewsDidSync: Ember.K,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment