Skip to main content

Search and Top Navigation

#8521 closed bug (notabug)

Opened August 24, 2012 08:23PM UTC

Closed August 30, 2012 10:47PM UTC

Error in sortable (match is not a function)

Reported by: gtraxx Owned by: gtraxx
Priority: minor Milestone: 1.9.0
Component: ui.sortable Version: 1.8.23
Keywords: Cc:
Blocked by: Blocking:
Description

Hello, I detect a bug with jquery sortable using jquery 1.7.2 and the update parameter

Example :

   $("ul#sortproduct").sortable({
	placeholder: 'ui-state-highlight',
        dropOnEmpty: false,
	axis: "y",
	cursor: "move",
	update : function (event, ui) {
	    var serial = $(this).sortable("serialize");
            //Ajax request ....
        }
   });

In Firebug :

TypeError: ($(o.item || this).attr(o.attribute || "id") || "").match is not a function

Probleme line 3698:

$(items).each(function() {
  var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
  if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
});

Test Solution :

$(items).each(function() {
 var res = ($(o.item || this).prop(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
 if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
});
Attachments (0)
Change History (3)

Changed August 25, 2012 12:53PM UTC by scottgonzalez comment:1

owner: → gtraxx
status: newpending

Please provide a reduced test case using jsFiddle or jsbin that reproduces the problem.

Changed August 30, 2012 10:36PM UTC by gtraxx comment:2

status: pendingnew

Thank you, after analysis and verification, the bug is visible only if jQuery tinymce 3.4.8 is loaded

I test with jQuery tinymce 3.5.6 and everything works fine.

Collisation with the tinyMCE jQuery 3.4.x is responsible for this error.

Best regards

Gerits Aurelien

Changed August 30, 2012 10:47PM UTC by scottgonzalez comment:3

resolution: → invalid
status: newclosed