diff --git a/apps/files/js/detailsview.js b/apps/files/js/detailsview.js index ac10b8380e..aed1736693 100644 --- a/apps/files/js/detailsview.js +++ b/apps/files/js/detailsview.js @@ -118,10 +118,13 @@ */ render: function() { // remove old instances - if ($('#app-sidebar').length === 0) { + var $appSidebar = $('#app-sidebar'); + if ($appSidebar.length === 0) { this.$el.insertAfter($('#app-content')); } else { - $('#app-sidebar').replaceWith(this.$el) + if ($appSidebar[0] !== this.el) { + $appSidebar.replaceWith(this.$el) + } } var templateVars = { diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 373aa38951..8e7c60551a 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -564,7 +564,7 @@ } this._currentFileModel = model; - + this._detailsView.render(); this._detailsView.setFileInfo(model); this._detailsView.$el.scrollTop(0); },