Losing focus on a contenteditable element when a user clicks outside that element

$('content').contentEditable=true;$('button').addEvent('mousedown', function(e) {
        console.log(window.getSelection().getRangeAt(0).startContainer);
        e.preventDefault();
}.bind(this));