Opened 6 years ago

Closed 6 years ago

#9543 closed (duplicate)

raw id fields' popups in generic inlines fail in IE 6/7

Reported by: jsmullyan 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: UI/UX:

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 jsmullyan 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by jsmullyan

comment:1 Changed 6 years ago by jsmullyan

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 6 years ago by nbstrite

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 6 years ago by jsmullyan

  • Resolution set to duplicate
  • Status changed from new to closed

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

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