IE8 issue with change triggering event

I currently have a class in which the default change event is added.

The default change event works in most cases, but in some cases I delete the change event and add a custom change event.

However, only in IE8, it seems I installed:

ele.checkbox.checkek = true;

the change event that I set to the checkbox is fired. In all other browsers, I need to call fireEvent ("change") to trigger an event change.

Is it possible to prevent this, or if there is a way that I can determine when adding custom changes?

Thanks.

+4
source share
1 answer

this is because of the bubbling onpropertychange that mootools is trying to normalize for you and transform into a change event ... see this post from 19 days ago: https://github.com/mootools/mootools-core/commit/8c97db6ba4b8a7f3b900f355d972c66b36a636b4 - maybe was broken by commits from Daniel Buchner and partly by myself, I believe.

you should just do element.fireEvent('change') to call your callback anyway

+2
source

Source: https://habr.com/ru/post/1493082/


All Articles