diff options
-rw-r--r-- | apps/files/js/fileactions.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index a844fba40a3..bb91842fa81 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -671,7 +671,12 @@ icon: '', actionHandler: function (filename, context) { var dir = context.$file.attr('data-path') || context.fileList.getCurrentDirectory(); - context.fileList.changeDirectory(OC.joinPaths(dir, filename), true, false, parseInt(context.$file.attr('data-id'), 10)); + if (OCA.Files.App.getActiveView() !== 'files') { + OCA.Files.App.setActiveView('files'); + OCA.Files.App.fileList.changeDirectory(OC.joinPaths(dir, filename), true, true); + } else { + context.fileList.changeDirectory(OC.joinPaths(dir, filename), true, false, parseInt(context.$file.attr('data-id'), 10)); + } }, displayName: t('files', 'Open') }); |