Skip to content

Commit

Permalink
Merge pull request unclecheese#19 from Martimiz/revertDeletion
Browse files Browse the repository at this point in the history
Fix: revertDeletion() remove input from HTML
  • Loading branch information
unclecheese committed Jun 10, 2015
2 parents 985503d + c90a24b commit c759c3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion javascript/file_attachment_field.js
Expand Up @@ -470,7 +470,8 @@ DroppedFile.prototype = {
* Undoes a detach/delete state
*/
revertDeletion: function () {
var del = this.getHolder().querySelector('input.input-deleted-file[value="'+this.getIdentifier()+'"]');
var holder = this.uploader.node.querySelector('.attached-file-deletions');
var del = holder.querySelector('input.input-deleted-file[value="'+this.getIdentifier()+'"]');
if(del) {
del.parentNode.removeChild(del);
}
Expand Down

0 comments on commit c759c3f

Please sign in to comment.