Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1638 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

[PATCH] AutoCompleteField spinner img should not have a "name" attribute

Reported by: salty-horse Owned by: anonymous
Priority: normal Milestone: 1.5
Component: TurboGears Version: 1.0.3.2
Severity: normal Keywords:
Cc:

Description (last modified by Chris Arndt) (diff)

See http://trac.turbogears.org/browser/branches/1.1/turbogears/widgets/big_widgets.py#L132

When submitting a form with the AutoCompleteField, the "name" of the image is sent with the other data. The name attribute is never referenced in the css/js, and is useless since an id is already defined.

This also has the evil side effect of forcing the developer to specifically specify autoCompleteSpinnerfoo=None in the POST handler function. Otherwise, an error is raised.

Attachments

autocomplete.patch Download (783 bytes) - added by salty-horse 11 years ago.
patch for 1.0 and 1.1

Change History

comment:1 Changed 11 years ago by Chris Arndt

  • Description modified (diff)

Changed 11 years ago by salty-horse

patch for 1.0 and 1.1

comment:2 Changed 11 years ago by salty-horse

  • Version changed from 1.1b1 to 1.0.3.2

The problem is in the 1.0 branch as well: http://trac.turbogears.org/browser/branches/1.0/turbogears/widgets/big_widgets.py#L132

Attaching a patch.

comment:3 Changed 11 years ago by khorn

  • Summary changed from AutoCompleteField spinner img should not have a "name" attribute to [PATCH] AutoCompleteField spinner img should not have a "name" attribute

changing summary to reflect attached patch

comment:4 Changed 11 years ago by chrisz

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

Though I can't reproduce the negative effects mentioned above, the name attribute for the image is certainly unnecessary (and I think even deprecated or illegal in modern (x)html versions!); the image is of course identified by its id. I have therefore applied this patch in r4058. I have also added an id attribute to the enclosing div so that it can be matched against a possible label (the ids of the member fields won't match).

Note: See TracTickets for help on using tickets.