Instead ofUpdated
Actually, you have to trigger $('.deo-' + type + '-hidden-input').attr('value', attachment.url);change
event to activate the Save button. WordPress widget handler listens to only changes. When you update the input field value with JS,
please try DOM doesn't trigger any $( '.deo-' + type + '-hidden-input' ).val( attachment.url );change
. That's why we have to trigger manually. Please check the following code -
$('.deo-' + type + '-hidden-input').val(attachment.url).trigger('change');