Closed dmitrizzle closed 7 years ago
Seems, the reason is that in compatibility mode MooTools replaces Function.prototype.bind
(that used by React) with non-standard implementation. #2511
I guess it won't be fixed.
Indeed. Many problems like these are caused by using MooTools Core with compatibility additions while it is not necessary. You have to choose between compatibility with old MooTools or compliance with newer standards.
Since this issue is rather old, I assume it has been solved by now, but just to be clear:
Do not use MooTools libraries in compatibility mode when you do not need compatibility with old MooTools versions. Doing so is basically depriving yourself of newer JavaScript features.
I have fixed this issue by deleting the line
delete Function.prototype.bind;
@whizsid you're my hero. Thank you!
Tested with MooTools 1.5.2 and 1.6.0 in compat mode. Both times I get error (see screenshot) which caused click events coded in React to seise firing after the first time.
However, when I use MT without the compat mode the issue disappears. Also note that using MT without the compat mode with Angular produces another fatal error in browser console
$clear is not defined
.