You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
when I paste image in visual editor, image is broken and there is no attachment after issue save.
I found the bug in javascript, where only inputs from dynamic edit field are submitted.
After this change it works. Can you check it and fix it? Thanks a lot.
--- a/assets/javascripts/issue_dynamic_edit.js+++ b/assets/javascripts/issue_dynamic_edit.js@@ -235,9 +235,13 @@ document.querySelector('body').addEventListener('click', function(e){
if(e.target.matches('.dynamicEditField .action.valid') || e.target.closest('.dynamicEditField .action.valid')){
e.preventDefault();
let inputs = e.target.closest('.dynamicEditField').querySelectorAll('*[name]');
+ let fileInputs = document.querySelectorAll('#new-attachments .attachments_fields *[name]');+ let allInputs = [];+ allInputs.push.apply(allInputs, inputs);+ allInputs.push.apply(allInputs, fileInputs);
let formData = [];
let existingIndex = [];
- inputs.forEach(elt => {+ allInputs.forEach(elt => {
let not_multiple = !elt.matches('input[type="radio"]') && !elt.matches('input[type="checkbox"]');
if(elt.matches('input[type="radio"]:checked') || elt.matches('input[type="checkbox"]:checked') || not_multiple){
if(!existingIndex.includes(elt.getAttribute('name'))){
The text was updated successfully, but these errors were encountered:
Hi,
when I paste image in visual editor, image is broken and there is no attachment after issue save.
I found the bug in javascript, where only inputs from dynamic edit field are submitted.
After this change it works. Can you check it and fix it? Thanks a lot.
The text was updated successfully, but these errors were encountered: