fix(capture): Add input to DOM before emitting click on it (#24841)
This commit is contained in:
parent
64a5ebb112
commit
bc0da15d20
1 changed files with 8 additions and 0 deletions
|
|
@ -31,6 +31,10 @@ function get_file_input() {
|
|||
input.setAttribute("accept", "image/*");
|
||||
input.setAttribute("multiple", "");
|
||||
|
||||
// Make sure that the input exists in the DOM
|
||||
input.classList.add("visually-hidden");
|
||||
document.body.appendChild(input);
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
|
|
@ -126,6 +130,10 @@ frappe.ui.Capture = class {
|
|||
me.images.push(f);
|
||||
}
|
||||
|
||||
// Remove the input from the DOM
|
||||
me.input.remove();
|
||||
me.input = null;
|
||||
|
||||
me.render_preview();
|
||||
me.dialog.show();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue