I have a jQuery function with even.preventDefault() applied to a click on any element with the class 'editable'.
It's not preventing gmail from opening up it sweb interface to send an email, however. It works on systems where default mail behaviour is not set up (the one I was primarily testing on).. not sure about when it's run through Outlook or an actual mail application.
Is there some workaround for this?
$('.editable').not('video, img, textarea').click(function(event) {
event.preventDefault();
loadEditor($(this));
});
edit: I have also tried with event.stopPropagation(); but it is still going through.
I'm not sure if there is actually a way to prevent this, none of the event related jQuery commands mentioned in other answers were effective.
For the meantime, I'm removing the 'mailto' part of the link when editing is enabled and it does the job just fine.