diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index 6c853bd07e..3222cd65cd 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -200,7 +200,8 @@ function fileExplorer (localRegistry, files) { } // register to main app, trigger when the current file in the editor changed - self._deps.fileManager.event.register('currentFileChanged', (newFile, explorer) => { + self._deps.fileManager.events.on('currentFileChanged', (newFile) => { + const explorer = self._deps.fileManager.fileProviderOf(newFile) if (self.focusElement && (!explorer || explorer.type !== files.type) && self.focusPath !== newFile) { self.focusElement.classList.remove('bg-primary') self.focusElement = null