Skip to main content

Bug Tracker

Side navigation

#9358 closed bug (wontfix)

Opened May 20, 2011 07:33AM UTC

Closed May 20, 2011 03:12PM UTC

Last modified May 20, 2011 03:17PM UTC

.attr -> .prob in version 1.6.1

Reported by: Owned by:
Priority: low Milestone:
Component: attributes Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:


Even though te supposed fix in 1.6.1, the following still breaks when upgrading from 1.5.8:

	var selectedIndex;
	selectedIndex = $("#year_week").attr("selectedIndex");
	$("#year_week").attr('selectedIndex', Math.max(selectedIndex - 1,0));

The "attr" method doesnt work anymore. Replacing by .prob fixes the issue.

Attachments (0)
Change History (2)

Changed May 20, 2011 03:12PM UTC by timmywil comment:1

component: unfiledattributes
priority: undecidedlow
resolution: → wontfix
status: newclosed

Please see the blog post for 1.6.1 release. This explains some of the differences between attributes and properties. selectedIndex and a few of the other rare cases did work with attr in the past, but attr did not officially support these properties. prop is the correct method.

Changed May 20, 2011 03:17PM UTC by dmethvin comment:2

Yes, .attr() is clearly wrong there since selectedIndex is always a property and never an attribute. That is different than situations like checked where the boolean attribute is reflected into a property.