Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: popup.js

Issue 29785555: Issue 6684 - Issue Reporter Active Tab Screenshot (Closed)
Patch Set: cleaner procedure through IR tab Created June 11, 2018, 5:04 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « metadata.chrome ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: popup.js
===================================================================
--- a/popup.js
+++ b/popup.js
@@ -98,21 +98,23 @@
activateClickHide.timeout = null;
}
document.body.classList.remove("clickhide-active");
browser.tabs.sendMessage(tab.id, {type: "composer.content.finished"});
}
function reportIssue()
{
+ // do not make the new tab active right away,
+ // let the issue reporter take the screenshot
+ // and handle it so don't window.close() neither
+ // or the screenshot for the active tab might fail
browser.tabs.create({
+ active: false,
url: browser.runtime.getURL("/issue-reporter.html?" + tab.id)
- }).then(() =>
- {
- window.close();
});
}
function toggleCollapse(event)
{
let collapser = event.currentTarget;
let collapsible = document.getElementById(collapser.dataset.collapsible);
collapsible.classList.toggle("collapsed");
« no previous file with comments | « metadata.chrome ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld