-
Notifications
You must be signed in to change notification settings - Fork 3
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
Select2 doesn't initialze in relation modal on first open #1544
Comments
b1rger
added a commit
that referenced
this issue
Jan 22, 2025
The reinit_select2 functionality is now in a separate `rel_reinit_select2` function which is run every time the js is included *and* when the `reinit_select2` trigger is received (though not sure if thats even needed now). In addition the javascript is included in the relation forms Media class, so that the js is included with every relation form and thus the `rel_reinit_select2` function is executed everytime the form in loaded which is what we actually want to make the select2 work everytime. Closes: #1544
b1rger
added a commit
that referenced
this issue
Jan 23, 2025
The reinit_select2 functionality is now in a separate `rel_reinit_select2` function which is run every time the js is included *and* when the `reinit_select2` trigger is received (though not sure if thats even needed now). In addition the javascript is included in the relation forms Media class, so that the js is included with every relation form and thus the `rel_reinit_select2` function is executed everytime the form in loaded which is what we actually want to make the select2 work everytime. Closes: #1544
b1rger
added a commit
that referenced
this issue
Jan 23, 2025
The reinit_select2 functionality is now in a separate `rel_reinit_select2` function which is run every time the js is included *and* when the `reinit_select2` trigger is received (though not sure if thats even needed now). In addition the javascript is included in the relation forms Media class, so that the js is included with every relation form and thus the `rel_reinit_select2` function is executed everytime the form in loaded which is what we actually want to make the select2 work everytime. Closes: #1544
Thanks so much - it was driving me mad, as I couldn't figure out a way to reproduce this issue reliably. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
... but it works when opening the modal a second time. This does not happen if another element on the page uses select2 (i.e. a foreignkey) and it also does not happen with the modals from apis-bibsonomy
The text was updated successfully, but these errors were encountered: