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

Bug on IE11 #26

Closed
DestroyCom opened this issue Sep 24, 2021 · 7 comments
Closed

Bug on IE11 #26

DestroyCom opened this issue Sep 24, 2021 · 7 comments
Labels
bug Something isn't working done Has been done.

Comments

@DestroyCom
Copy link

Hello,
I'm doing a project on IE11,
by integrating kioskboard on my page everything works correctly on chrome and firefox.
But on internet explorer 11, the developer console displays an error SCRIPT1014 invalid character in the file kioskboard-1.4.0.min.js at (3,17779).

The bug also appears in the file kioskboard-aio-1.4.0.min.js at (3,35291)

It seems to come from this part of the code
image

Thanks for your help !

@furcan
Copy link
Owner

furcan commented Sep 24, 2021

Hi @DestroyCom ,

I couldn't reproduce the issue on IE11 with the same version and the same minified file.

ie11

Maybe you can try again with unminified version and then, let's see what's changing.

<script src="src/all-in-one/kioskboard-aio.js"></script>

Thanks,
Furkan.

@DestroyCom
Copy link
Author

DestroyCom commented Sep 24, 2021

Thanks for your fast reply !
I get the same error on the src folder versions (all-in-one or not).
After some search on google, this line seems to be in charge :
image
(this is a screen of the src/kioskboard.js file)
(There is some links, that i can find :

Il'l try to find what causes this problem but I am only a beginner developer and I am a bit lost 😅

My IE11 is the 21H1 Version.
Also i forgot to mention that I use the "kioskboard-keys-french.json" file

@furcan
Copy link
Owner

furcan commented Sep 24, 2021

Hi @DestroyCom ,

I think it should be related to your language JSON file.

Could you please share the language file content that you have been set as keysJsonUrl?

Then, let's see the next.

Thanks,
Furkan.

@furcan
Copy link
Owner

furcan commented Sep 24, 2021

Hi @DestroyCom ,

I just have seen your update that you are using the kioskboard-keys-french.json file that has been provided with this library.

Let's try again this way, and see the results. (using an Array of Objects instead of using XHR)

var frenchKeys = [{"0":"A","1":"Z","2":"E","3":"R","4":"T","5":"Y","6":"U","7":"I","8":"O","9":"P"},{"0":"Q","1":"S","2":"D","3":"F","4":"G","5":"H","6":"J","7":"K","8":"L","9":"M"},{"0":"W","1":"X","2":"C","3":"V","4":"B","5":"N","6":"É","7":"È","8":"Ç","9":"À"}];

KioskBoard.Run('.my-selectors', {
  keysArrayOfObjects: frenchKeys,
  keysJsonUrl: null,
  // and the other options if you already have been set, etc...
});

Thanks,
Furkan.

@DestroyCom
Copy link
Author

DestroyCom commented Sep 24, 2021

Your right,
the error comes from the "JSON.parse" line and the use of the keysJsonUrl parameter,
I just tried using keysArrayOfObjects and and everything works fine.

After some tests on all keys files, the error occurs with the files :

  • kioskboard-keys-german.json
  • kioskboard-keys-french.json
  • kioskboard-keys-spanish.json

I suspect some character to be the cause of the issue,
for the french :
"6": "É", "7": "È", "8": "Ç","9": "À"
for the Spanish:
"9": "Ñ"
and for the german:
"10": "Ü","9": "Ö", "10": "Ä"

I don't really know why IE11 react like that maybe he didn't like these characters or like to import them

@DestroyCom
Copy link
Author

DestroyCom commented Sep 24, 2021

It's perfect, I just tested with the array, and it works perfectly well, so it's almost sure that it's the import that causes this issue, I can say that now my issue is closed,
but now I don't really know how can you fix that for IE11 (if you have the desire to do so of course 😅), the array works perfectly so I guess you can just add this to your readme 😁🎉!!!

Once again, thank you very much !!

@furcan
Copy link
Owner

furcan commented Sep 24, 2021

Hi @DestroyCom ,

Great to hear that you have resolved your issue 🙏

So,
The only fix for IE11 in this case: Hope to IE leaves us alone in 2022 😄

lets-hope-for-ie11

Have a nice weekend,
Furkan.

@furcan furcan added bug Something isn't working done Has been done. labels Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done Has been done.
Projects
None yet
Development

No branches or pull requests

2 participants