summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChirag Bhatia <chiragbhatia2006@gmail.com>2018-06-26 00:49:06 +0530
committerChirag Bhatia <chiragbhatia2006@gmail.com>2018-06-26 00:49:06 +0530
commit3f4a54b698aa75cd6072e49d9adee453d293e4cc (patch)
treeb8dc8276799c1649c8e9330737edeedbb5a2e6ff
parentdd949b0be4b2187d01a05ea1ce32abc295077897 (diff)
downloadgitlab-ce-3f4a54b698aa75cd6072e49d9adee453d293e4cc.tar.gz
Bugfix for #48378 - Resetting value of input element to fix Chrome-specific issue
-rw-r--r--app/assets/javascripts/profile/gl_crop.js3
-rw-r--r--changelogs/unreleased/48378-avatar-upload.yml5
2 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/profile/gl_crop.js b/app/assets/javascripts/profile/gl_crop.js
index c6d809d84a6..3e7f3d49d33 100644
--- a/app/assets/javascripts/profile/gl_crop.js
+++ b/app/assets/javascripts/profile/gl_crop.js
@@ -47,7 +47,8 @@ import _ from 'underscore';
var _this;
_this = this;
this.fileInput.on('change', function(e) {
- return _this.onFileInputChange(e, this);
+ _this.onFileInputChange(e, this);
+ this.value = null;
});
this.pickImageEl.on('click', this.onPickImageClick);
this.modalCrop.on('shown.bs.modal', this.onModalShow);
diff --git a/changelogs/unreleased/48378-avatar-upload.yml b/changelogs/unreleased/48378-avatar-upload.yml
new file mode 100644
index 00000000000..1e359ee72d5
--- /dev/null
+++ b/changelogs/unreleased/48378-avatar-upload.yml
@@ -0,0 +1,5 @@
+---
+title: Fixes issue with uploading same image to Profile Avatar twice
+merge_request: 20161
+author: Chirag Bhatia
+type: fixed