0

I have an element in my page that is editable with jEditable.

The behaviour I'm looking for and can't find a way to implement is that I want the field to become editable on a click event, and I want it to be submitted only on a blur event.

The reason is that I want the users to be able to do mouse operations such as double-click to select all and partial selections. Currently this is not possible because every click inside the jedtiable created form submits it.

This is the code I call jeditable with:

$('#element').editable(function(value, settings){
    return(value);
  },{
    onblur: 'submit',
    cssclass: 'editing',
    event: 'startedit'
  }
);
Ohad
  • 1,719
  • 1
  • 16
  • 20

1 Answers1

0

Can this be what you're looking for http://jsfiddle.net/PB9kx/1/ ?

  1. does not submit on enter
  2. submits on blur
sites
  • 21,417
  • 17
  • 87
  • 146
  • Well, it does work. And it made me realise my question was irrelevant and that the problem I had was caused due to some other functionality I added which is not related to jeditable. Thanks for the wake up call! :) – Ohad Aug 30 '12 at 08:10