sortable + blur - broken?
I'm having trouble with a sortable setup and I believe it's a bug.
I have setup a very simple standard sortable like the following:
<ul id="items">
<li>item 1</li>
<li>item 2</li>
</ul>
When the user clicks one of the items in the sortable I am doing an
"edit-in-place" textfield. So basically I overwrite the text content
of the <li> with an <input type="text">. I do this all via jQuery and
that all works great. The rub is that I want the edit-in-place
textfield to go away when the blur event is fired on the textfield.
That works sometimes, but appears to be broken because of sortable.
Let me explain.
If I click somewhere on the page other than the <li>'s containing <ul>
the edit-in-place textfield receives the blur event and I'm able to
capture that event and revert the <li> back to text. However, if I
click anywhere inside the <ul> (ie. another <li> element) the
textfield does not get the blur event.
I know that this is happening because of sortable as I can remove
sortable from the <ul> and then if I click other <li>'s the edit-in-
place textfield gets the blur event.
Any help with how to handle this is greatly appreciated.
I believe this to be a bug with sortable and need help with a
workaround until it is resolved.
Thanks,
-Bill