Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9358 closed bug (wontfix)

.attr -> .prob in version 1.6.1

Reported by: leongersen@… Owned by:
Priority: low Milestone: 1.next
Component: attributes Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Description

Hello,

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));
	change_week();

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

Change History (2)

comment:1 Changed 9 years ago by timmywil

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.

comment:2 Changed 9 years ago by dmethvin

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.

Note: See TracTickets for help on using tickets.