I am using the editArea library and jquery to do what i need...
http://www.cdolivet.com/index.php?page=editArea&sess=2b8243f679e0d472397bfa959e1d3841
so
If all else fails, I ended up getting the above to work by wrapping in this function:
$(window).blur(function () { // genius code here }