Opened 13 years ago

Closed 11 years ago

#17074 closed Bug (fixed)

Custom widget use hidden input Bug.

Reported by: Kidwind Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

my custom widget use a hidden input, and use javascript to change the input's value. when my model field use the widget and in first of the form,i get "Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus." for add model object in ie6 and ie7.

Attachments (2)

change_form.html.diff (655 bytes ) - added by Kidwind 13 years ago.
17074.diff (815 bytes ) - added by Julien Phalip 13 years ago.

Download all attachments as: .zip

Change History (6)

by Kidwind, 13 years ago

Attachment: change_form.html.diff added

comment:1 by Julien Phalip, 13 years ago

Triage Stage: UnreviewedAccepted

by Julien Phalip, 13 years ago

Attachment: 17074.diff added

comment:2 by Julien Phalip, 13 years ago

The patch above takes a different approach to focus on the first visible field (which may be the form's second field if the first one is hidden). If we go with that approach then AdminForm.first_field would not be needed any more and could be removed.

comment:3 by Claude Paroz, 12 years ago

Julien, +1 for your approach. Go ahead!

comment:4 by Claude Paroz, 11 years ago

Resolution: fixed
Status: newclosed

In [1c0c879be3a21affec3d5eb2d6b6e4f0a0803aec]:

Fixed #17074 -- Improved first field detection in admin add form

Thanks Kidwind for the report and Julien Phalip for the initial
patch.

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