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

Fix django-nested-admin dragging fields #1309

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

trumpet2012
Copy link
Contributor

Fixing an issue where dragging an inline admin section would initialize the autocomplete fields during the dragging phase and when dragging stopped the autocomplete field would be reset and not get initialized again since the internal initialized list would already contain that element.

To prevent this, added a check to the DOM listener logic to verify that the container element being added isn't the one used to represent the element while it is being dragged.

Before

Screen.Recording.2022-09-20.at.6.19.03.PM.mov

After

Screen.Recording.2022-09-20.at.6.20.44.PM.mov

…the autocomplete fields during the dragging view and when dragging stopped the autocomplete field would be reset and not get initialized again since the internal initialized list would already contain that element.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants