Opened 12 years ago

Closed 12 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


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 -- 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)

generic_inline_raw_id_IE_fix.patch (1006 bytes) - added by Jacob Smullyan 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by Jacob Smullyan

comment:1 Changed 12 years ago by Jacob Smullyan

Has patch: set

comment:2 Changed 12 years ago by Nowell Strite

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.

comment:3 Changed 12 years ago by Jacob Smullyan

Resolution: duplicate
Status: newclosed

Thanks, nbstrite, you are quite right. Closing this out.

Note: See TracTickets for help on using tickets.
Back to Top