emberx-select
emberx-select copied to clipboard
Edge and long arrays.
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
The overheads are also seen on mobile platforms as they dont have the same processing power.
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!
What browsers are you seeing that error in.
Works in Edge, fails in older IE because they dont support the .map ES6 function
Should confirm the error was about the array cant be a negative length.