Closed marcosguedes closed 1 month ago
Hi all. The X button on a FilerImageField has an href="#" which sends the user to the top of the page when clicked.
href="#"
I tested this on Django 3, not sure if it happens on others. Quite strange to not see it reported sooner.
The small fix I did was to simply replace # with javascript:void(0); in admin_file.html which seemed to take care of the problem
#
javascript:void(0);
<a class="filerClearer {% if not object %}hidden{% endif %}" title="{% translate 'Clear' %}" - data-no-icon-file="{% static 'filer/icons/file-unknown.svg' %}" href="#"> + data-no-icon-file="{% static 'filer/icons/file-unknown.svg' %}" href="javascript:void(0);"> <span class="fa fa-close filer-icon filer-icon-remove-selection"></span> </a>
admin_folder.html should also have the same problem but I haven't tested yet
Completed with #1453
Thank you, perfect, this looks much more clean than my fix
Hi all. The X button on a FilerImageField has an
href="#"
which sends the user to the top of the page when clicked.I tested this on Django 3, not sure if it happens on others. Quite strange to not see it reported sooner.
The small fix I did was to simply replace
#
withjavascript:void(0);
in admin_file.html which seemed to take care of the problemadmin_folder.html should also have the same problem but I haven't tested yet