Having an issue with the eventListener
function. I am using the external library jquery.jstree-pre1.0fix2, which triggers a blur
event on an input in my case.
However, I need to trigger my event before the one from the library. I have come across some solutions that involve jQuery, but I am looking for a code example or idea using native JS.
Is there any way you can suggest how I can trigger my event before the library's event? Below is the event I want to execute before the library's event:
document.getElementById('treeView').addEventListener("change", function (ev) {
if(ev.target.classList.contains('jstree-rename-input')) {
var inputRename = ev.target;
inputRename.addEventListener("blur", function(eve) {
eve.value = encodeURI(eve.value);
});
}
});