Skip to content

Commit

Permalink
Fix scrollHeight on non-touch when loggedIn status has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul de Vries committed Oct 28, 2015
1 parent e539f0a commit c8f6e77
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions octoprint_touchui/static/js/includes/knockout.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
this.DOM.init.call(this);
this.scroll.beforeLoad.call(this);

gcodeFilesViewModel.listHelper.paginatedItems.subscribe(function(a) {
if( !self.isTouch ) {
if( !self.isTouch ) {
gcodeFilesViewModel.listHelper.paginatedItems.subscribe(function(a) {
setTimeout(function() {
self.scroll.iScrolls.body.refresh();
}, 600);
}
});
}, 0);
});
}
},

isReady: function(touchViewModel, viewModels) {
Expand Down Expand Up @@ -98,6 +98,11 @@
$('#navbar_login a.dropdown-toggle').removeClass("hidden_touch");
$('#login_dropdown_loggedin').removeClass('visible_touch');
}

// Refresh scroll view when login state changed
setTimeout(function() {
self.scroll.currentActive.refresh();
}, 0);
});
}
if($("#navbar_systemmenu").length > 0) {
Expand Down

0 comments on commit c8f6e77

Please sign in to comment.