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

Please don't send me OC Forum Personal Messages, just contact: jti@jacob.ch
---
OC 1.5.6.5 LIGHT Test Site: http://www.bigmax.ch/shop/
OC 1.5.6.5 V-PRO Test Site: http://www.jacob.ch/shop/
My Github OC Site: https://github.com/IP-CAM
2'450+ FREE OC Extensions from the World's largest 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 1 guest