Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing an images jumps the screen to the top of the page #1452

Closed
marcosguedes opened this issue Mar 20, 2024 · 2 comments
Closed

Removing an images jumps the screen to the top of the page #1452

marcosguedes opened this issue Mar 20, 2024 · 2 comments

Comments

@marcosguedes
Copy link

Hi all. The X button on a FilerImageField has an href="#" which sends the user to the top of the page when clicked.

image

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

            <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

@fsbraun
Copy link
Sponsor Member

fsbraun commented May 19, 2024

Completed with #1453

@fsbraun fsbraun closed this as completed May 19, 2024
@marcosguedes
Copy link
Author

Thank you, perfect, this looks much more clean than my fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants