]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not open the sidebar automatically on small widths 36409/head
authorSimon L <szaimen@e.mail.de>
Fri, 27 Jan 2023 13:11:44 +0000 (14:11 +0100)
committerSimon L <szaimen@e.mail.de>
Thu, 2 Feb 2023 18:01:19 +0000 (19:01 +0100)
Signed-off-by: Simon L <szaimen@e.mail.de>
apps/files/js/filelist.js

index e7641b2607d7e7c6aeaaae635c6c5b5e33d850e8..2d93ced71006c20c4c287a2fa425a3031813d994 100644 (file)
                                                        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)
                                        }
                        }
                        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) {