Opened 16 years ago
Closed 16 years ago
#9543 closed (duplicate)
raw id fields' popups in generic inlines fail in IE 6/7
Reported by: | Jacob Smullyan | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When using a raw id field in a generic inline, the popup will not work in IE 6/7. Instead of popping up the select-to-add form, the javascript click handler fails, and the document is replaced by a select-to-change form.
This happens because generic inlines use dashes in their field ids, and this field id is used to construct the window name passed to window.open() -- but IE doesn't permit dashes in window names. There is already some code in place to deal with IE's similar allergy to periods, by replacing then with double underscores; I attach a patch to deal with dashes in the same manner.
This patch works for django-1.0.X and django trunk.
Attachments (1)
Change History (4)
by , 16 years ago
Attachment: | generic_inline_raw_id_IE_fix.patch added |
---|
comment:1 by , 16 years ago
Has patch: | set |
---|
comment:2 by , 16 years ago
comment:3 by , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Thanks, nbstrite, you are quite right. Closing this out.
This is a duplicate of #9539 and #9332. #9539 has a patch that will work in all cases, the attached patch will breakdown due to the fact that we need to reconstruct the field name in order for the popped up window to know that field to insert the selected data into. By replacing both "-" and "." with the same sequence we cannot reconstruct the original field name.