Open koryteg opened 7 years ago
@koryteg only firefox? Interesting. I'll check it. Can you check if the tests pass on firefox and if they do, create a failing test that exercises this error?
yeah I will try and get something going on a PR.
We had a similar issue recently, but it got both Chrome and Firefox freezing. I tracked it down to passing null
as the selected
date to the calendar. However it might be the same issue.
@boyanyordanov how did you resolve? does selected date accept an empty object just as well?
FWIW, I did not find a way to reproduce this, but I suspect the reason. There is a part of the code where I compare dates on a while and keep iterating until a date is before or after another one. So far so good, but if the moment
is malformed, that loop never ends causing the freeze.
Why can that happen in one browser and not in another? Because the only date format that is guaranteed to work in all browsers is ISO 8601. Any other format may or may not work. Chrome per example is pretty good at parsing malformed dates. Firefox is more strict.
I suspect this is the root cause, if anyone wants to investigate.
We've run into this issue as well.
I believe our test case for the fix was something like:
{{power-calendar date="Invalid Date"}}
Or something similar
@NLincoln Cheers.
@cibernox I have not been able to reproduce either. A tester reported it as an issue but didn't see an immediate cause. If I ever get time to investigate further I'll let you know. Thanks for the lead.
@bahdvp I am sorry, I was not able to write earlier. We just don't initialize the values and have checks in the parent component to ensure we always pass down a valid date.
firefox is freezing when hitting this method if you pass a moment.js date object to the addon.