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

Edge and long arrays. #201

Open
MatthewPringle opened this issue Nov 22, 2017 · 3 comments
Open

Edge and long arrays. #201

MatthewPringle opened this issue Nov 22, 2017 · 3 comments

Comments

@MatthewPringle
Copy link

MatthewPringle commented Nov 22, 2017

Version of x-select: 3.1

Ember Version / Ember CLI Version: 2.12

Ember Version:
Ember CLI Version:

Expected Behavior

emberx-select should not cause Edge ( v13) to crash when it is given a very long list of options.

Actual Behavior

Passing in a long list of options causes older versions of Edge to crash, Javascript shows an error in console but in classic IE fashion you cant debug the crash with the console open.

Background: emberx-select was being used on an insurance form for 20+ questions.

It was used numerous times across numerous pages and worked like a charm for every question.

Unfortunately one question, had 200+ options and only in Edge ( tested in 25/13 ) it would cause a crash. Edge would popup about an array being empty? and the component would not draw or work.

I couldn't debug the crash as Edge would not report anything of use, but deleting options to around 100 would then make it work.

Only crashed in Edge ( IE9 / 10 / 11 / Chrome / Android etc... all fine ).

Im adding this issue so developers who need to support all browsers / browser versions etc... know this is a possible issue.

In the end I just wrote my own to replace emberx-select and managed the data differently. I suspect each being its own component causes large overheads and unexpected behaviour in Edge. The overheads are also seen on mobile platforms as they dont have the same processing power.

@Robdel12
Copy link
Collaborator

So I was able to confirm it's not just an edge bug with a large select.
(https://codepen.io/anon/pen/XzqjKZ)

So this one might be a fun one to track down!

@MatthewPringle
Copy link
Author

What browsers are you seeing that error in.

Works in Edge, fails in older IE because they dont support the .map ES6 function

@MatthewPringle
Copy link
Author

Should confirm the error was about the array cant be a negative length.

@Robdel12 Robdel12 added this to the 3.1.2 milestone Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants