From f7b267a61b355ed7276f664051373da357aa4713 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20H=C3=A4rtl?= Date: Wed, 8 Jan 2020 09:09:31 +0100 Subject: [PATCH] Properly set current file info when switching the details view MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files/js/filelist.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index fd7624e452a..108e10f4df6 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -650,6 +650,14 @@ var model = this.getModelForFile(tr) var path = model.attributes.path + '/' + model.attributes.name + // make sure the file list has the correct context available + if (this._currentFileModel) { + this._currentFileModel.off(); + } + this.$fileList.children().removeClass('highlighted'); + tr.addClass('highlighted'); + this._currentFileModel = model; + // open sidebar and set file OCA.Files.Sidebar.open(path.replace('//', '/')) }, -- 2.39.5