I would like to trigger a focus event no matter where I click on the document. However, I use a sorted list in which each sortable element contains a text field, the focus event does not fire when clicking on the sortable elements. The same thing happens with draggable items. I created jsfiddle to demonstrate this problem:
Click on the text box and try to click anywhere in the blue rectangle: Tested in Google Chrome http://jsfiddle.net/RWJhs/
Are there any known workarounds?
JavaScript:
$("textarea").focusout(function(){ alert("Do something"); }); $("#draggable").draggable();
HTML:
<div id="draggable"> <textarea></textarea> </div>
source share