fires on changing the focus location in the Editor
myEditor.attachEvent("onFocusChanged", function(state){ // your code here });