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

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

Issue 11969051: Handle the 'cancel' case on attach a file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/feedback.js
diff --git a/chrome/browser/resources/feedback.js b/chrome/browser/resources/feedback.js
index 70e63524f7b66d60236c340a6ea8d483d87795e8..e4d6e57ddefe129641757e6b5dc90f2d0677312d 100644
--- a/chrome/browser/resources/feedback.js
+++ b/chrome/browser/resources/feedback.js
@@ -95,6 +95,13 @@ function enableScreenshots() {
*/
function onFileSelected(evtFileSelected) {
var file = evtFileSelected.target.files[0];
+ if (!file) {
+ // User canceled file selection.
+ $('attach-file-checkbox').checked = false;
+ attachFileBinaryData = null;
+ return;
+ }
+
if (file.size > MAX_ATTACH_FILE_SIZE) {
$('attach-error').hidden = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698