XWIKI-9353: Editing macros in IE 10 copies them to the top of the page
* Both blur and focusOut are fired after the selection is lost so we have to use beforeDeactivate event to save the selection.