Fix Issue comment submit button disabled on GFM paste
What does this MR do?
- Fix Issue comment submit button disabled on GFM paste
Are there points in the code the reviewer needs to double check?
When copying some text from another note and pasting, it goes through the copy_as_gfm
paste
handler
that calls e.preventDefault()
which stops things.
But then when inserting the text, we manually trigger an input
event with jQuery which doesn't seem to be picked up by Vue v-model
. Using a native new Event('input')
seems to work great for Vue and autosave.
I am guessing this broke in 10.0 with our issue notes refactor to Vue, https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12069
Why was this MR needed?
Pasting content from another note, doesn't enable the comment submission button.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Review
-
Has been reviewed by Frontend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered
What are the relevant issue numbers?
Closes #40373 (closed)
Edited by Eric Eastwood