jQuery 1.5, jQuery UI and WordPress problems

Just a couple of links about WordPress problems caused by some incompatibilities between jQuery 1.5 and jQuery UI:


Patching CDN hosted jQuery

Today I encountered my first bug in the latest release of  jQuery, the 1.5 version.

After upgrading to this version, the drag and drop functionality (implemented with the jQuery UI Draggable interaction component)  of a project I am working on started to exhibit strange behaviors.  After some bug hunting I found that the problem was caused by this bug.

The fix is already on GitHub and will be released with the 1.5.1 milestone.

Meanwhile, because I am using the library file hosted on the CDNs, I patched it overriding the offending function like this:

<script src="http://code.jquery.com/jquery-1.5.js"></script>
   jQuery.fn.clone = function( dataAndEvents, deepDataAndEvents ) {
      dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
      deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;

      return this.map( function () {
         return jQuery.clone( this, dataAndEvents, deepDataAndEvents );