{% block elfinder_widget %}
    <input type="text" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %} data-type="elfinder-input-field" />
    {% if enable and instance is defined %}
        <script type="text/javascript" charset="utf-8">
            $('[data-type="elfinder-input-field"][id="{{ id }}"]').on("click",function() {
                var childWin = window.open("{{path('elfinder', {'instance': instance })}}?id={{ id }}", "popupWindow", "height=450, width=900");
            });
            function setValue(value, element_id) {
                $('[data-type="elfinder-input-field"]' + (element_id ? '[id="'+ element_id +'"]': '')).val(value);
            }
        </script>
    {% endif %}
{% endblock %}

{% block elfinder_widget %}
    <input type="text" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %} data-type="elfinder-input-field" />
    {% if enable and instance is defined %}
        <script type="text/javascript" charset="utf-8">
            $('[data-type="elfinder-input-field"][id="{{ id }}"]').on("click",function() {
                var childWin = window.open("{{path('elfinder', {'instance': instance })}}?id={{ id }}", "popupWindow", "height=450, width=900");
            });
            function setValue(value, element_id) {
                $('[data-type="elfinder-input-field"]' + (element_id ? '[id="'+ element_id +'"]': '')).val(value).change();
            }
        </script>
    {% endif %}
{% endblock %}

Add triggering of change event
Add triggering of change event

It will trigger `change` event when new value is set from ElFinder popup. Now this event isn't triggered, and binding of events to `input` aren't work.
