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)

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

Download all attachments as: .zip

Change History (4)

by Jacob Smullyan, 16 years ago

comment:1 by Jacob Smullyan, 16 years ago

Has patch: set

comment:2 by Nowell Strite, 16 years ago

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 by Jacob Smullyan, 16 years ago

Resolution: duplicate
Status: newclosed

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

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