Opened 14 years ago
Closed 12 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 History (6)
by , 14 years ago
| Attachment: | change_form.html.diff added |
|---|
comment:1 by , 14 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
by , 14 years ago
| Attachment: | 17074.diff added |
|---|
comment:2 by , 14 years ago
comment:4 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
In [1c0c879be3a21affec3d5eb2d6b6e4f0a0803aec]:
Fixed #17074 -- Improved first field detection in admin add form
Thanks Kidwind for the report and Julien Phalip for the initial
patch.
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_fieldwould not be needed any more and could be removed.