• Resolved nywebconsulting

    (@nywebconsulting)


    When the search bar is included on a site viewed in IE11, JS breaks and subsequent JS on the remaining page does not execute. We have users forced to still use IE11 – is it possible to catch this / handle gracefully even if search does not work?

    Version: 1.8.2
    Error:
    SCRIPT438: Object doesn’t support property or method ‘includes’
    search.min.js (1,39437)

Viewing 1 replies (of 1 total)
  • Plugin Author Mateusz Czardybon

    (@matczar)

    Hi,

    Sorry for that. We will try to fix it in the next version.

    For now, you can use this snippet to add a polyfill for IE11:

    
    add_action( 'wp_footer', function () {
    	?>
            <script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.includes%2CString.prototype.includes"></script>
    	<?php
    }, 5);
    

    You have two ways to add this code to your theme:
    – Open the functions.php in your Child Theme and add the code at the end
    – or install the Code Snippets plugin (https://www.ads-software.com/plugins/code-snippets/) and apply this code as a snippet.

Viewing 1 replies (of 1 total)
  • The topic ‘Search bar breaks JS in IE11’ is closed to new replies.