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
Collapsed fieldset flickers when StackedInline is expanded #129
Comments
Is this a regression in 1.6.8 vs 1.6.7? Btw i can't see any flickering on my ~4.5 years linux old laptop in the test applications shipped in the repository. UPDATE: collapse.js could use some cleanup though |
Just checked in 1.6.7 - StackedInline does not even collapse there. 1.6.8 is kinda better, but something a little strange with inner fieldset. I've uploaded video: You can see in some frames that "More info" fieldset gets expanded, with |
Thanks for the video, collapse.js is the django one though. Does adding display: block to a.collapsed help? |
Nope. |
So it turns out this is the bootstrap collapse stuff, according to [1] performance may vary depending on the html. Also it looks to me that collapsible fieldsets inside empty inlines are collapsed together and not just the one where i clicked. [1] http://stackoverflow.com/questions/24166588/bootstrap-3-accordion-effect-on-table-is-very-slow |
Yes, fieldsets expands together for brief time and collapses. If there would be some kind more "precise", limiting selectors, maybe only parent one would be expanded/collapsed then. |
That could be the cause of the slowness you see, we're doing a lot more work than the one we need to. |
Add a prefix to each nested fieldsets so that only one clicked gets the collapse event and not every collapsed fieldsets of the same inline formset. As discussed in django-admin-bootstrapped#129
Any chance you can try latest master please? i've fixed the multiple opening of collapsible fields, hopefully it helps. |
@Talkless I took another stab at this, indeed this is not working at all. Unfortunately i really don't see why stacked_prefix is not passed down to includes/fieldset.html |
which fieldset to collapse. fixes django-admin-bootstrapped#129
@Talkless Please give it a try to latest master as @brandoncazander fixed it! |
Using:
Python 3.4.1
Django 1.6.6
django-admin-bootstrapped 1.6.8
Test foo.models.py:
Test foo.admin.py:
To reproduce:
#1 (ab relation)
.Repead 3-2-3-2.. until eye caches that in fact "More info" with "A title" is expanded, visible for a spit second. The more fields are in fieldset, the more it's noticeable.
Same with Kubuntu 14.04 Firefox 31 and Windows 7 (VirtualBox) Chrome, IE10, Opera, ...
The text was updated successfully, but these errors were encountered: