From: Simon L Date: Fri, 27 Jan 2023 13:11:44 +0000 (+0100) Subject: Do not open the sidebar automatically on small widths X-Git-Tag: v26.0.0beta3~32^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7fa42a2f032db62294c9c1b5ef3af5bbd92029d2;p=nextcloud-server.git Do not open the sidebar automatically on small widths Signed-off-by: Simon L --- diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index e7641b2607d..2d93ced7100 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -433,7 +433,9 @@ OCA.Files.Files.handleDownload(url); } - OCA.Files.Sidebar.open(fileInfo.path); + if (document.documentElement.clientWidth > 1024) { + OCA.Files.Sidebar.open(fileInfo.path); + } } catch (error) { console.error(`Failed to trigger default action on the file for URL: ${location.href}`, error) } @@ -3340,7 +3342,9 @@ } if (file.length === 1) { _.defer(function() { - this.showDetailsView(file[0]); + if (document.documentElement.clientWidth > 1024) { + this.showDetailsView(file[0]); + } }.bind(this)); } this.highlightFiles(file, function($tr) {