Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple problems in IE 11 #1476

Closed
M4ttsson opened this issue Nov 8, 2023 · 1 comment
Closed

Multiple problems in IE 11 #1476

M4ttsson opened this issue Nov 8, 2023 · 1 comment

Comments

@M4ttsson
Copy link

M4ttsson commented Nov 8, 2023

Unfortunately we still have customers that use IE 11 and the latest version is not working. The live demo page is also not working in IE11.

It seems like there might be two issues, one is the usage of 'closest' method that is unsupported. And an error in utils.js that only says 'Const must be initialized (6,541)' but we were unable to figure out what is wrong there, "isValidNumber" method always returns false.

Usage of 'closest' was added in #1430. A workaround is to use a Polyfill as per stackoverflow (https://stackoverflow.com/a/61958369). But still not working properly due to our usage of utils.

Steps to reproduce

  1. Create site with intl-tel-input, everything default. (or use included html example below)
  2. Start IE11, go to page.
  3. Look at errors in console, input field is just an empty input field and no flags etc.

Expected behaviour

IE 11 is listed as supported so it should work.

Actual behaviour

Two errors in console. One is that closest is unknown (flags will not be shown) and the other is that utils.js has syntax errors and will not work.
image
image

Initialisation options

See getting-started-using-a-cdn on Readme. Including a tiny repro page below.

Repro page

<html lang="en">
    <head>
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/css/intlTelInput.css">
    </head>
    <body>
        <input id="phone" />

        <script src="https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/js/intlTelInput.min.js"></script>
        <script>
          const input = document.querySelector("#phone");
          window.intlTelInput(input, {
            utilsScript: "https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/js/utils.js",
          });
        </script>
    </body>
</html>

Ps. If using Win 11. The easiest way to still open IE is to put the following in a .vbs file.
CreateObject("InternetExplorer.Application").Visible=true

@jackocnr
Copy link
Owner

jackocnr commented Nov 8, 2023

Thanks for reporting this, but unfortunately, given IE11 has now been retired, we'll be dropping support too. I've updated the readme to reflect this.

@jackocnr jackocnr closed this as completed Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants