Post by vikasbook » Wed Jul 22, 2020 8:55 pm

I am creating an opencart e-shop and there is a bug, where when I am typing to a textarea element, another part of the UI is modified. I want to stop this, so I thought to do that with JavaScript. I am trying to overwrite the change and input events like:

Code: Select all

function stopEvent(ev) { 
    ev.preventDefault();
    ev.cancelBubble=true;
    ev.stopPropagation();
}

element.addEventListener("change", stopEvent, false);
but does not work. Is it possible that the CRM does that in a different way other than tapping these "typing" events? Is something wrong with the script? I had found the events attached to the element with getEventListeners(element).

Newbie

Posts

Joined
Wed Jul 22, 2020 8:25 pm

Post by IP_CAM » Thu Jul 23, 2020 4:53 am

Without mentioning OC Version and Theme used, it's impossible to reply on anything.
Please note that for further use.
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 2 guests