Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1891)

Unified Diff: chrome/browser/resources/feedback/js/feedback.js

Issue 2826753002: Fix a bug of black area on window close (Closed)
Patch Set: Write handling in one function to reduce coupling factor Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/feedback/js/topbar_handlers.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/feedback/js/feedback.js
diff --git a/chrome/browser/resources/feedback/js/feedback.js b/chrome/browser/resources/feedback/js/feedback.js
index cb51b9629910f70da86451009b12e0717b8dffd6..7a75f10455ae85965436e7a6add156c4de7b803f 100644
--- a/chrome/browser/resources/feedback/js/feedback.js
+++ b/chrome/browser/resources/feedback/js/feedback.js
@@ -201,7 +201,7 @@ function sendReport() {
// this window right away. The FeedbackRequest object that represents this
// report will take care of sending the report in the background.
sendFeedbackReport(useSystemInfo);
- window.close();
+ scheduleWindowClose();
return true;
}
@@ -211,7 +211,7 @@ function sendReport() {
*/
function cancel(e) {
e.preventDefault();
- window.close();
+ scheduleWindowClose();
}
/**
@@ -281,6 +281,13 @@ function onSystemInformation() {
}
/**
+ * Close the window after 100ms delay.
+ */
+function scheduleWindowClose() {
+ setTimeout(function() { window.close();}, 100);
+}
+
+/**
* Initializes our page.
* Flow:
* .) DOMContent Loaded -> . Request feedbackInfo object
@@ -312,7 +319,7 @@ function initialize() {
$('srt-accept-button').onclick = function() {
chrome.feedbackPrivate.logSrtPromptResult(SrtPromptResult.ACCEPTED);
window.open(SRT_DOWNLOAD_PAGE, '_blank');
- window.close();
+ scheduleWindowClose();
};
$('close-button').addEventListener('click', function() {
« no previous file with comments | « no previous file | chrome/browser/resources/feedback/js/topbar_handlers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698