Edgewall Software
Modify

Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#10165 closed enhancement (fixed)

Upgrade to jQuery 1.7.x

Reported by: cboos Owned by: jomae
Priority: normal Milestone: 1.0
Component: general Version: 0.13dev
Severity: normal Keywords: jquery javascript
Cc:
Release Notes:

Upgraded jQuery to 1.7.2.

API Changes:

Upgraded jQuery to 1.7.2.

Description

http://blog.jquery.com/2011/05/03/jquery-16-released/

Shouldn't be a big deal, but as usual with a new major version, careful testing is needed (and early exposure in trunk could bring that).

Also the .prop(), .removeProp(), and .attr() section there made me think of our little discussion about .checked in threaded comments(ticket:7145#comment:28). We should experiment.

Attachments (0)

Change History (9)

comment:1 Changed 3 years ago by Anton

  • Summary changed from Upgrade to jQuery 1.6.x to Upgrade to jQuery 1.7.x

By the way:

this ticket should be upgrade to jQuery 1.7.x or whatever is actual at the release date.

I just changed the title to 1.7.x Actually the 1.7.2 beta is out: http://blog.jquery.com/2012/01/31/jquery-1-7-2-beta-1-released/

comment:2 follow-up: Changed 3 years ago by cboos

Upgraded to 1.7.2 in r11035.

I didn't notice any regression in Chrome yet, but there's one in IE (7 and 8 but not 9): for the semi-automatic bug report, the newlines are missing in the description, so the structure in the wiki text is lost.

Last edited 3 years ago by cboos (previous) (diff)

comment:3 in reply to: ↑ 2 ; follow-up: Changed 3 years ago by cboos

Replying to cboos:

in IE (7 and 8 but not 9): for the semi-automatic bug report, the newlines are missing in the description, so the structure in the wiki text is lost.

The following works:

  • trac/templates/error.html

     
    4646    <script type="text/javascript">/*<![CDATA[*/ 
    4747      jQuery(document).ready(function($) { 
    4848        $("form.newticket textarea").each(function() { 
    49           $(this).text($(this).text() 
     49          $(this).text($(this).html().replace(/\r/g, '') 
    5050                         .replace(/#USER_AGENT#/m, navigator.userAgent) 
    5151                         .replace(/#JQUERY#/m, $().jquery)); 
    5252        }); 

However, looking at the jQuery code, it seems that the code which removed the newlines is no longer present in 1.7.3pre (referring to http://bugs.jquery.com/ticket/11153 instead).

So maybe the best course of action for this little issue is to simply wait for the next upgrade, 1.7.3.

comment:4 in reply to: ↑ 3 ; follow-up: Changed 3 years ago by jomae

Replying to cboos:

Replying to cboos:

in IE (7 and 8 but not 9): for the semi-automatic bug report, the newlines are missing in the description, so the structure in the wiki text is lost.

The following works: #!diff...

I wonder we don't use .val() instead of .text()…. It works on Firefox 11, Chrome 19 and IE 8.

  • trac/templates/error.html

     
    4646    <script type="text/javascript">/*<![CDATA[*/ 
    4747      jQuery(document).ready(function($) { 
    4848        $("form.newticket textarea").each(function() { 
    49           $(this).text($(this).text() 
    50                          .replace(/#USER_AGENT#/m, navigator.userAgent) 
    51                          .replace(/#JQUERY#/m, $().jquery)); 
     49          $(this).val($(this).val() 
     50                      .replace(/#USER_AGENT#/m, navigator.userAgent) 
     51                      .replace(/#JQUERY#/m, $().jquery)); 
    5252        }); 
    5353      }); 
    5454    /*]]>*/</script> 

comment:5 in reply to: ↑ 4 ; follow-up: Changed 3 years ago by cboos

Replying to jomae:

I wonder we don't use .val() instead of .text()…. It works on Firefox 11, Chrome 19 and IE 8.

… and indeed doesn't need the .replace(/\r/g, '') trick!

I overlooked .val() in the jQuery API. It seems totally appropriate to use it here. Please commit!

comment:6 in reply to: ↑ 5 Changed 3 years ago by jomae

Replying to cboos:

… and indeed doesn't need the .replace(/\r/g, '') trick!

I overlooked .val() in the jQuery API. It seems totally appropriate to use it here. Please commit!

Ok, committed in [11037].

comment:7 Changed 2 years ago by cboos

  • Owner set to jomae

I just noticed we were still running r11033 on t.e.o (i.e. with jQuery 1.5.1). Let's get a bit more exposure before closing this ticket (reassigning to jun, as he's to one having contributed the significant fix on this topic).

comment:8 Changed 2 years ago by rblank

  • API Changes modified (diff)
  • Resolution set to fixed
  • Status changed from new to closed

We have been running [11050] (jQuery 1.7.2 as on trunk) since June 3rd, and haven't noticed any regressions.

comment:9 Changed 2 years ago by cboos

  • Release Notes modified (diff)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed The owner will remain jomae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from jomae to the specified user.
Author


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

 
Note: See TracTickets for help on using tickets.