diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-11-08 00:53:12 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-11-09 17:45:00 +0100 |
commit | a8fea270edce79f2676e79b1edde8bb4daba8294 (patch) | |
tree | b2233b3db2da391317cb569f1ab8cfdf994814c0 /apps/files/js/gotoplugin.js | |
parent | d65fd72452a09d6c107517d5a7c08d138c009c54 (diff) | |
download | nextcloud-server-a8fea270edce79f2676e79b1edde8bb4daba8294.tar.gz nextcloud-server-a8fea270edce79f2676e79b1edde8bb4daba8294.zip |
Fix sidebar not automatically hidden in Files app
Although the Files app creates the legacy sidebar (details view) it is
then replaced with the newer Vue app sidebar. Due to this ".detailsView"
no longer finds an element and therefore nothing was hidden when
"hideAppSidebar($('.detailsView'))" was called (for example, when
changing to another section).
However, "OC.Apps.hideAppSidebar()" does not properly work either with
the Vue sidebar used in the Files app (once hidden the sidebar is not
shown again). For simplicity, and to avoid any possible side effect in
other apps from changing "OC.Apps.hideAppSidebar", now
"OC.Files.Sidebar.close()" is used instead.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files/js/gotoplugin.js')
-rw-r--r-- | apps/files/js/gotoplugin.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/js/gotoplugin.js b/apps/files/js/gotoplugin.js index 474acdab587..ca1823697c4 100644 --- a/apps/files/js/gotoplugin.js +++ b/apps/files/js/gotoplugin.js @@ -45,7 +45,7 @@ type: OCA.Files.FileActions.TYPE_DROPDOWN, actionHandler: function (fileName, context) { var fileModel = context.fileInfoModel; - OC.Apps.hideAppSidebar($('.detailsView')); + OCA.Files.Sidebar.close(); OCA.Files.App.setActiveView('files', { silent: true }); OCA.Files.App.fileList.changeDirectory(fileModel.get('path'), true, true).then(function() { OCA.Files.App.fileList.scrollTo(fileModel.get('name')); |