Browse Source

don't open the viewer when annotating the page
(fix #1286)

Gildas 2 years ago
parent
commit
0768ebccfa
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/bg/downloads.js

+ 2 - 2
src/core/bg/downloads.js

@@ -203,7 +203,7 @@ async function downloadContent(contents, tab, incognito, message) {
 				await bookmarks.update(message.bookmarkId, { url: response.url });
 			}
 			ui.onEnd(tabId);
-			if (message.openSavedPage) {
+			if (message.openSavedPage && !message.openEditor) {
 				const createTabProperties = { active: true, url: "/src/ui/pages/viewer.html?blobURI=" + URL.createObjectURL(new Blob(contents, { type: MIMETYPE_HTML })), windowId: tab.windowId };
 				if (tab.index != null) {
 					createTabProperties.index = tab.index + 1;
@@ -298,7 +298,7 @@ async function downloadCompressedContent(message, tab) {
 				await bookmarks.update(message.bookmarkId, { url: response.url });
 			}
 			ui.onEnd(tabId);
-			if (message.openSavedPage) {
+			if (message.openSavedPage && !message.openEditor) {
 				const createTabProperties = { active: true, url: "/src/ui/pages/viewer.html?compressed&blobURI=" + URL.createObjectURL(blob), windowId: tab.windowId };
 				if (tab.index != null) {
 					createTabProperties.index = tab.index + 1;