I am using jQuery UI-sortable interaction and Jeditable . The idea is that the user can change the order of the elements and influence the contents of these elements. I got confused that the onblur event , which I have a Jeditable setup for listening to, is swallowed by a sorted jQuery listener.
The user can click on the Jeditable element and this element will become editable, but when they click, if they click on li , which is sorted, the onblur event is ignored. An event is not ignored if they go beyond li . How can I make Jeditable know about the blur event when they click inside li ?
Here's jsFiddle illustrating the problem
HTML markup
<ul class="elementlist"> <li id="elementSk_10"> <span class="editable-element" id="10">TEXT!</span> </li> <li id="elementSk_33"> <span class="editable-element" id="33">Some text</span> </li> </ul>
Jeditable
$('.editable-element').editable('http://jsfiddle.net/echo/jsonp/', { onblur: 'submit', width: 250, indicator: 'Saving...' });
jQuery UI Sortable
$(".elementlist").sortable({ update: function(event, ui) { var elementSerialized = $(this).sortable('serialize'); $.post('http://jsfiddle.net/echo/jsonp/', { elementSk: $(this).sortable('serialize') }); } });β
Edit : In an attempt to clarify what is happening, let me give a step-by-step guide and screenshots.
- Click
Some Text - Press
li containing TEXT! - Release the
TEXT! button TEXT!


At this moment, I did not reorder anything. Clicking on li and releasing did not onblur for Jeditable. I would like a simple click act to trigger onblur. If I do not collect the sort, this is how it works. I have to believe that clicking on li swallowed by sorting.
Here is another example with reordering, but not yet onblur .
- Click
Some Text - Press
li containing TEXT! - Move
TEXT! below Some Text - Release the
TEXT! button TEXT!



After reordering the elements and freeing the li containing TEXT! , onblur not fixed. Elements are in a new order, but Some Text is still in an editable state.
Everything said here is what I expect:
Clicking on anything outside the editable field should trigger onblur Jeditable. What exactly happens if jQuery collation is not connected. When jQuery sortable is connected to trigger the onblur behavior, I have to click outside the sorted list items.