diff --git a/dynamic_raw_id/static/dynamic_raw_id/js/dynamic_raw_id.js b/dynamic_raw_id/static/dynamic_raw_id/js/dynamic_raw_id.js index 7f28cd0..030c43a 100644 --- a/dynamic_raw_id/static/dynamic_raw_id/js/dynamic_raw_id.js +++ b/dynamic_raw_id/static/dynamic_raw_id/js/dynamic_raw_id.js @@ -84,7 +84,8 @@ function dismissRelatedLookupPopup(win, chosenId) { $('.dynamic_raw_id-clear-field').click(function() { const $this = $(this); $this - .closest('.vForeignKeyRawIdAdminField, .vManyToManyRawIdAdminField') + .parent() + .find('.vForeignKeyRawIdAdminField, .vManyToManyRawIdAdminField') .val('') .trigger('change');