Skip to content

Commit

Permalink
Merge pull request #36409 from nextcloud/enh/noid/dont-automatically-…
Browse files Browse the repository at this point in the history
…open-sidebar-on-mobile

Do not open the sidebar automatically on small widths
  • Loading branch information
szaimen authored Feb 3, 2023
2 parents 08bfe64 + 7fa42a2 commit a579b36
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit a579b36

Please sign in to comment.