Archived topic
gp 2.3 alpha.3 - consider using passive listeners
18 replies · Started by Enrico on June 7, 2019
@Grant,
From what I can understand from the WordPress ticket, they don't want to implement the proposed solution in the ticket as it does break IE11 compatibility.
I am concerned for WordPress as I see 6K+ tickets, some from 10+ years and they just keep growing, while most of their work is focused on Gutenberg now, I can only imagine how many nasty things there are that are still not solved.
It would be really nice if someone can participate and maybe propose that fix if it doesn't break IE11 compatibility. I don't want to re-apply that patch each time. I am just not a coder and don't know how to propose it in WordPress trac.
In the meantime, I will try to implement it on my WordPress installation.
Kind Regards
I had this issue, I resolved it by editing the following:
wp-includes/js/comment-reply/js
line 96 & line 120:
element.addEventListener( 'touchstart', clickEvent, { passive: false } );
element.addEventListener( 'click', clickEvent );
change to:
element.addEventListener( 'touchstart', clickEvent, { passive: true } );
element.addEventListener( 'click', clickEvent );
You're not editing the .min file because that one is auto-generated.
Hi Melissa,
thanks for sharing, please be mindful that any changes to core WP Files is something most developers would advise against and any changes you make to them will be overwritten when WP is updated :)
Yes, you're right, I definitely should have noted that in my post. I keep a cardfile list of all necessary core WP edits with reason for editing, location of the edit & the benefit it achieves. Sometimes it takes WP a few updates before they incorporate something, passive listeners has been an issue for a long while now.