Please confirm if "editablefields-processed" is intentionally to be with comma, see editablefields.js line #12:

  $('div.editablefields',context).not(',editablefields-processed').submit(function(){
     return false;
  });

It breaks all other javascripts in the page. When I change the comma into dot. All works just fine.

CommentFileSizeAuthor
#2 preventsumbits.patch708 bytesmarkfoodyburton

Comments

markfoodyburton’s picture

Odd - long time ago since I looked at this code, but I think ',' means something to jQuery......
Seems to be working for other people though?

Cheers

Mark.

markfoodyburton’s picture

Title: Typos on editablefields.js breaks other js » Preventing textfields sumbitting (was Typos on editablefields.js breaks other js)
StatusFileSize
new708 bytes

janvandiepen fixed this in the 6.2 branch, however, I think this breaks text fields :-(

I _think_ this code (which dates back to a long time ago) was intended to prevent e.g. text fields being submitted accidental by pressing e.g. the return key. (The result of which is you get the XML code, which is not pretty (and not cleaver) )

When there was a ',' there, I _think_ the 'not' selector was not finding anything to not, and was therefore allowing the selection ---- Sorry - too many nots' - hope you follow.

Hence "fixing" the not, makes the selector fail to select - result - the thing actually fails...

I think the right 'fix' is to actually remove the not selector...

e.g.
$('div.editablefields', context).not('.editablefields-processed').submit(function(){
return false;
});

becomes
$('div.editablefields', context).submit(function(){
return false;
});

I've included the patch.

It would be most appreciated if somebody else could check this.....

Cheers

Mark.

joelpittet’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing this to triage the queue. Feel free to comment if you'd like this to be re-opened, though currently there is nobody supporting the 6.x branch.