kaffa / textpattern

Automatically exported from code.google.com/p/textpattern
0 stars 0 forks source link

Compatibility with jQuery 1.9 #345

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
jQuery 1.9 removes many of the items they deprecated during the last few 
versions of jQuery; see 
http://blog.jquery.com/2012/12/17/jquery-1-9-beta-1-released/

This issue tracks any compatibility issues within Textpattern.

Original issue reported on code.google.com by r.wetzlmayr on 18 Dec 2012 at 9:49

GoogleCodeExporter commented 8 years ago
Any more thoughts on jQuery UI too?

Original comment by flaming....@mac.com on 18 Dec 2012 at 10:05

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
jQuery.fn.txpMultiEditForm causes a warning:

"JQMIGRATE: property-based jQuery.fn.attr('value') is deprecated"

The message stems from this expression at 
http://code.google.com/p/textpattern/source/browse/development/4.x/textpattern/t
extpattern.js?r=5061#537:

form.editMethod.find('option[value!=""]')

A minimal test case is at http://jsfiddle.net/e2rgj/

Original comment by r.wetzlmayr on 18 Dec 2012 at 11:19

GoogleCodeExporter commented 8 years ago
Related upstream issue report: http://bugs.jquery.com/ticket/13073

Original comment by r.wetzlmayr on 18 Dec 2012 at 11:39

GoogleCodeExporter commented 8 years ago
I've committed few changes to the code base that should fix most of the 
(intended) incompatibilities between Textpattern and jQuery 1.9.

About the selector, I did remove it (with pretty stupid commit message), but as 
far as I'm aware Sizzle gets the attribute and attribute only. But the code 
Sizzle (selectors) and jQuery use is the same. Sizzle build that is included in 
jQuery uses jQuery's new attrhooks (there is an override).

In short, internally both $.fn.attr('value') and [value] are the same.

Original comment by jukka.m.svahn on 18 Dec 2012 at 2:41

GoogleCodeExporter commented 8 years ago
Taking bit back what I said about Sizzle. It has the issue, right? The issue 
does spawn from use of getAttributeNode() (etc.) on inputs? It's vendor 
specific error? Either way, both selecting methods work identically now. If the 
behavior has been changed, it's done for both.

The migrater will notify from either or since the hooks are triggered by both. 
Technically other one might not be deprecated. Depends. Code-wise they are the 
same, and using either or doesn't matter way or the other.

Original comment by jukka.m.svahn on 18 Dec 2012 at 3:17

GoogleCodeExporter commented 8 years ago
I think this has to be resolved upstream by the jQuery project. 

Until now, it is not documented that by deprecating jQuery.fn.attr('value') 
they also intended to deprecate attribute selectors whenever the selector 
contains a reference to some 'value' attribute.

Original comment by r.wetzlmayr on 18 Dec 2012 at 3:24

GoogleCodeExporter commented 8 years ago

Original comment by r.wetzlmayr on 25 Dec 2013 at 9:53