Skip to content

TagSpaces is an offline, open source, document manager with tagging support

Moving updateUI

Ilian79b0f51f26df
diff --git a/data/js/fileopener.js b/data/js/fileopener.js
index c90a5c935..8c2f6aa5d 100644
--- a/data/js/fileopener.js
+++ b/data/js/fileopener.js
@@ -174,9 +174,7 @@ define(function(require, exports, module) {
_openedFilePath = filePath;
$("#selectedFilePath").val(_openedFilePath.replace("\\\\","\\"));
- var fileExt = TSCORE.TagUtils.extractFileExtension(filePath);
-
- updateUI();
+ var fileExt = TSCORE.TagUtils.extractFileExtension(filePath);
// Getting the viewer for the file extension/type
var viewerExt = TSCORE.Config.getFileTypeViewer(fileExt);
@@ -189,8 +187,6 @@ define(function(require, exports, module) {
} else {
$( "#editDocument" ).show();
}
-
- initTagSuggestionMenu(filePath);
$( "#viewer" ).empty();
@@ -218,6 +214,10 @@ define(function(require, exports, module) {
_tsEditor.init(filePath, "viewer", true);
});
}
+
+ updateUI();
+ initTagSuggestionMenu(filePath);
+
// Clearing file selection on file load and adding the current file path to the selection
TSCORE.PerspectiveManager.clearSelectedFiles();