summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-11-28 19:03:23 +0000
committerClement Ho <clemmakesapps@gmail.com>2017-11-28 19:03:23 +0000
commit1ce27c7d78f0833985ef82b0018064d3c821b9fe (patch)
tree13616d13e64360605cb9cc4c40a5f592d981fccc
parent7bab05b77041b40f8daf530744fc0c10b6c2330f (diff)
parent078ba6a2d677abeea7b4bf4090fd0577e94b6ff5 (diff)
downloadgitlab-ce-1ce27c7d78f0833985ef82b0018064d3c821b9fe.tar.gz
Merge branch '40373-fix-issue-note-submit-disabled-on-paste' into 'master'
Fix Issue comment submit button disabled on GFM paste Closes #40373 See merge request gitlab-org/gitlab-ce!15530
-rw-r--r--app/assets/javascripts/lib/utils/common_utils.js2
-rw-r--r--changelogs/unreleased/40373-fix-issue-note-submit-disabled-on-paste.yml6
2 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js
index 6fa1e84c170..33cc807912c 100644
--- a/app/assets/javascripts/lib/utils/common_utils.js
+++ b/app/assets/javascripts/lib/utils/common_utils.js
@@ -190,7 +190,7 @@ export const insertText = (target, text) => {
target.selectionStart = target.selectionEnd = selectionStart + insertedText.length;
// Trigger autosave
- $(target).trigger('input');
+ target.dispatchEvent(new Event('input'));
// Trigger autosize
const event = document.createEvent('Event');
diff --git a/changelogs/unreleased/40373-fix-issue-note-submit-disabled-on-paste.yml b/changelogs/unreleased/40373-fix-issue-note-submit-disabled-on-paste.yml
new file mode 100644
index 00000000000..e683e60397e
--- /dev/null
+++ b/changelogs/unreleased/40373-fix-issue-note-submit-disabled-on-paste.yml
@@ -0,0 +1,6 @@
+---
+title: Fix Issue comment submit button being disabled when pasting content from another
+ GFM note
+merge_request: 15530
+author:
+type: fixed