I’m trying to make my own Wysiwyg redactor.
I have a problem: when I click the control button contenteditable div loses focus and make some actions, which I’d like to make only if was not clicked control-button.
So is there something like this in javascript:
$('#tarea').blur(function(event){
if($(event.reasonelement).is('#bold')) return false;
//Other actions here...
});
Thank you!
One way would be capturing the document’s click event and decide what to do with that:
PS: This should work for all kind of elements and not just textareas.