Clean up misuse of null in quickElement
|Reported by:||parsch.inc@…||Owned by:||nobody|
|Cc:||bmispelon||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
On line 39 of SelectFilter.js the quickElement('div', from_box.parentNode)is missing the third argument – one would expect it to be quickElement('div', from_box.parentNode, '').
This does not lead to an error with django so far, but led to one with django-grappelli (https://github.com/sehmaschine/django-grappelli/issues/405).
I know that this should theoretically be prevented by line 41 of core.js (https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/core.js#L41) but it failed anyway.
As all other quickElement()s in SelectFilter.js carry a third argument, that argument might be applied to the incomplete one too.
There`s also a pull request on github referring to this (https://github.com/django/django/pull/1922).
Change History (7)
comment:1 Changed 17 months ago by bmispelon
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:3 Changed 17 months ago by bmispelon
- Component changed from Uncategorized to contrib.admin
- Easy pickings set
- Patch needs improvement set
- Summary changed from SelectFilter2.js: quickElement() is missing third argument to Clean up misuse of null in quickElement
- Triage Stage changed from Unreviewed to Accepted