Вы можете выполнить итерацию jQuery._data(<DOM element>, 'events')
и удалить как делегированные, так и не делегированные события
$("body").on('click', '#clinicalNotesEditable', function() {
console.log('delegated');
});
$("body").on('click', function() {
console.log('not delegated');
});
$('#clinicalNotesEditable').on("click", function() {
$(this).attr('disabled', false);
$(this).attr('readonly', false);
console.log('Click on textarea by ID');
});
$('#clinicalNotesEditable').on("keyup keydown keypress", function() {
console.log('Key pressed on textarea by ID');
//I see this in the CONSOLE
});
var selector = '#clinicalNotesEditable';
$.each([$(window), $(document), $("*")], function(key, value) {
$.each(value, function(k, v) {
var event = $._data(v, "events");
if (event !== undefined) {
$.each(event, function(a, b) {
if (b[0].selector === selector) {
$(v).off(a, '**');
} else {
if ('#' + v.id === selector) {
$(selector).off(a);
}
}
});
}
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<textarea class="noteseditable" id="clinicalNotesEditable" style="width: 370px !important; vertical-align: middle; display: inline-block; -ms-overflow-y: scroll;" placeholder="click here to enter a note" rows="8"></textarea>