Bug Tracker

Modify

Ticket #9358 (closed bug: wontfix)

Opened 2 years ago

Last modified 2 years ago

.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:
Blocking: Blocked by:

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

comment:1 Changed 2 years ago by timmywil

  • Priority changed from undecided to low
  • Resolution set to wontfix
  • Status changed from new to closed
  • Component changed from unfiled to attributes

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 2 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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.