Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#17311 closed enhancement (fixed)

Update to jQuery 1.6.1

Reported by: scribu's profile scribu Owned by: azaozz's profile azaozz
Milestone: 3.2 Priority: normal
Severity: normal Version:
Component: External Libraries Keywords:
Focuses: Cc:

Description

jQuery 1.6 was released today.

This update will require more testing than usual, since some breaking changes were made to the commonly used .attr() function.

Attachments (2)

jquery 1.6.patch (172.8 KB) - added by hebbet 14 years ago.
t17311-jquery-144-161.diff (166.9 KB) - added by JDTrower 14 years ago.
Updates jQuery from 1.4.4 to 1.6.1

Download all attachments as: .zip

Change History (30)

@hebbet
14 years ago

#1 @hebbet
14 years ago

  • Keywords has-patch needs-testing added

#3 @aaroncampbell
14 years ago

It looks like there are several places that we should be using .prop() instead of .attr(). I'm a little unclear so someone should verify, but it seems that most places where we are setting an attribute we should actually be setting the property. Additionally several places where we check an attribute (especially "checked" and "disabled") we should be actually be checking the property. However, I think everywhere we're checking id, name, etc we should continue using attr().

#4 @scribu
14 years ago

  • Keywords needs-patch added; has-patch needs-testing removed

#5 @ramoonus
14 years ago

  • Cc ramoonus@… added

#6 @Denis-de-Bernardy
14 years ago

  • Cc Denis-de-Bernardy added

#7 follow-up: @nacin
14 years ago

  • Milestone changed from Future Release to 3.2

Suggesting as a candidate for 3.2. Note it also fixes #16643.

#8 in reply to: ↑ 7 @Viper007Bond
14 years ago

Replying to nacin:

Suggesting as a candidate for 3.2. Note it also fixes #16643.

We should get it in ASAP then.

#9 @dd32
14 years ago

Suggesting as a candidate for 3.2.

We've already got breakage for back-compat with 1.5.2 (" in selectors), Leaving this out of 3.2 will mean when 3.3 is released, some authors will have to update their JavaScript yet again to support the 1.6 changes. We still have a fair amount of time left for bugfixing, so it's not out of the question to include 1.6..

#10 @scribu
14 years ago

I would suggest waiting at least for 1.6.1 (which should be released this week), since it will likely contain a fix for the .attr('checked') and .attr('selected') debacle.

Can't find where I read John Resig mentioning that.

#12 @sbressler
14 years ago

  • Cc sbressler@… added

#13 @scribu
14 years ago

When updating from 1.5.2 to 1.6.1, you should not have to change any code.

http://blog.jquery.com/2011/05/10/jquery-1-6-1-rc-1-released/

#14 @azaozz
14 years ago

Agree that the sensible thing would be to add 1.6.1 to 3.2, hopefully it will be released on time. We will have to update jQuery UI after that too.

#15 @aaroncampbell
14 years ago

I was in the jquery-dev channel this morning and their plan was to release 1.6.1 tomorrow. I'm not sure that's still on track because they found a regression that affects Drupal. I looked through and it doesn't look like it would affect us, but just in case here it is:
I happens most often when using ajax to update parts of the document, but the root cause is really when injecting a script snippet into the page. It only happens if there is a CDATA section that is commented like this:

<!--//--><![CDATA[//><!--
...
//--><!]]>

The issue is the html comment around a js comment immediately before the CDATA.

John Resig said that doing it the proper way still works. This was what he said was 'proper':

// <![CDATA[
...
// ]]>

I asked specifically about using block comments (which we do in several places) and they said that would still work as well:

/* <![CDATA[ */
...
/* ]]> */

Most of their comments aren't on the ticket yet, but here it is: http://bugs.jquery.com/ticket/9221

#16 @jane
14 years ago

  • Milestone changed from 3.2 to Future Release

Punting for now b/c past feature freeze, may revisit if 1.6.1 comes out soon enough in beta.

#17 @aaroncampbell
14 years ago

Just an update: The bug I mentioned above has been fixed (http://bugs.jquery.com/ticket/9221). Hopefully that means 1.6.1 will be here soon.

#20 @scribu
14 years ago

  • Milestone changed from Future Release to 3.2

Yes, we've heard.

@JDTrower
14 years ago

Updates jQuery from 1.4.4 to 1.6.1

#21 @JDTrower
14 years ago

Getting ready to begin testing that patch to ensure things work based on the list found at http://core.trac.wordpress.org/ticket/16426#comment:16 I'll also work at getting a Codex page up that details that list so we can ensure that testing follows a good checklist.

#22 @azaozz
14 years ago

Fixed few small bugs that showed with 1.6.1 in core and putting it in. @JDTrower perhaps better to make sure latest UI works well with 1.6.1. Seems we will have that combination in 3.2 if no blockers there.

#23 @azaozz
14 years ago

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

In [17907]:

jQuery 1.6.1 and fix for some small bugs that popped up while testing it, props JDTrower, fixes #17311

#24 follow-up: @JDTrower
14 years ago

@azaozz, I tested both jQuery 1.6.1 and jQuery UI 1.8.12 with the latest Trunk using my test install in IE 8, IE 9, FF 3.6, FF 4.0, Safari 5, Chrome 10, Opera 10, and Opera 11 on Windows Vista and Windows 7 computers and I didn't notice any bugs. Everything worked as expected. This was done on a test install with 311 posts, 387 pages, 216 categories, 408 tags, and 401 comments. Everything dragged and dropped like it should, and there were no flickering bugs.

#25 in reply to: ↑ 24 ; follow-up: @azaozz
14 years ago

Replying to JDTrower:

Thanks a lot for checking them and confirming all works as expected. Very much appreciate it.

#26 in reply to: ↑ 25 @JDTrower
14 years ago

Replying to azaozz:

Not a problem, my pleasure.

#27 @ramoonus
14 years ago

  • Keywords needs-patch removed
  • Summary changed from Update to jQuery 1.6 to Update to jQuery 1.6.1

#28 @azaozz
14 years ago

In [18027]:

Replace .attr() with .prop() as per jQuery 1.6.1. Also fixes couple places where the JS wasn't working because attr('some', ) does not remove the HTML property now, see #17311

Note: See TracTickets for help on using tickets.