• Resolved emendo_seb

    (@seb-emendo)


    Hi,

    First of all. Thanks for your plugin ??
    We have identify a bug. We think.

    At the end of your file /includes/js/index.js
    you have the command : document.querySelectorAll(“.wpcf7 > form”).forEach((function(e){return wpcf7.init(e)}))

    In IE11 the Nodelist object (return by the querySelectorAll) has not the forEach method directly accessible.
    So we have this error in the console : The object does not support the “forEach” property or method.

    And the form not work in IE11.

    Best regards,
    Sebastien

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter emendo_seb

    (@seb-emendo)

    FYI : We use wordpress 5.7 and contact form 5.4.
    And test from IE 11.15 on windows 10.

    Best,
    Sebastien.

    Thread Starter emendo_seb

    (@seb-emendo)

    Ok. We see that you use the Symbol type in your JS. Not support by IE11, since middle december. Is it a choice to not support IE 11 ?

    We don’t really like it too, but our customers websites have visitors using IE11. From 2% to 11% depending on website profile (for business, personnal, …).

    Thanks for your time,
    Regards
    Seb

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website in question?

    Thread Starter emendo_seb

    (@seb-emendo)

    Hi,

    It seem’s that we meet several problems.

    https://demo.emendo.fr/wpcf7/

    1) Install a clean website with : wordpress 5.7, twenty twenty-one theme and wpcf7 5.4.
    -> Contact form work on ie11 without error

    2) We enable Google Recaptcha v3 integration on this website.
    -> We got error on Symbol and contact form not work on ie11

    3) We try to reproduce error on foreach for querySelectorAll.
    This error is still present on our websites but not on this one.
    We try to find the difference and the reason …

    Seb.

    Thread Starter emendo_seb

    (@seb-emendo)

    Ok.

    The theme twenty twenty-one include /assets/js/polyfills.js for ie11.
    It’s why we not see error on : querySelectorAll.foreach

    Thread Starter emendo_seb

    (@seb-emendo)

    In this file.
    They add the support of the foreach function in Nodelist on IE11.

    So contact form 7 v5.4 will work on iE11 with twenty twenty-one theme.
    But not with other themes that not integrate this descended compatibility.

    The good question is : why this patch is not include in wp-polyfill.js ?

    /**
     * Polyfill for NodeList.foreach() because we need to support IE11.
     *
     * @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
     */
    if ( window.NodeList && ! NodeList.prototype.forEach ) {
    	NodeList.prototype.forEach = function( callback, thisArg ) {
    		var i;
    		thisArg = thisArg || window;
    		for ( i = 0; i < this.length; i++ ) {
    			callback.call( thisArg, this[i], i, this );
    		}
    	};
    }
    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thank you for sharing your findings. I don’t know why those polyfills are only in TT1, either.

    Thread Starter emendo_seb

    (@seb-emendo)

    After an whole day of work, we found a solution … remove ie11 from our support stack ??
    Too much incompatibility, now is the time.

    Thanks for your time,
    Best
    Seb

    • This reply was modified 3 years, 12 months ago by emendo_seb.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘IE11 – The object does not support the “forEach” property or method’ is closed to new replies.