Flatpickr: RangeError: Maximum call stack size exceeded in v2.0.0-rc.7

Created on 16 Aug 2016  路  14Comments  路  Source: flatpickr/flatpickr

If flatpickr is placed inside bootstrap modal, an error occurs when it tries to select a year.
Version: v2.0.0-rc.7
Bootstrap: v3.3.7
Browser: Google Chrome v52.0

captura de pantalla 2016-08-15 a las 17 57 33

bug

Most helpful comment

Recently I came across the same error. The flatpickr was inside of a bootstrap modal. But only one flatpickr produced the RangeErrors. So I wondered and discovered that the error only occurs when the tabindex property is set on the modal root div.

<div class="modal fade" tabindex="-1" role="dialog">

Once I removed it, everything seems to work out just fine.

I don't know why, but somehow the tabindex property seems to be the problem.

All 14 comments

Hello,

Thanks for reporting the issue.
Looking into it

馃憤

This issue is still present!
err1

Could you post the error stack trace?
Thank you

flatpickr.js:85 Uncaught RangeError: Maximum call stack size exceeded.

I'm using Bootstrap v3.3.2
Jquery 2.1.1

Same error is also triggered from jQuery-

jquery-2.1.1.min.js:1199 Uncaught RangeError: Maximum call stack size exceeded.

err2

I commented out the focus listener. I felt like it's selecting on focusing, which again focuses.. and so on chasing it's own tail. It's not throwing the recursion error now. But the input is not updating!

Thank you..

I will try to test this with new version...

Any luck?

@chmln error persists yet.
Here my fiddle: https://jsfiddle.net/joseluisq/sam7rcqo/
Simply open the modal and select some year in the flatpickr.

flatpickr/2.0.0-rc.8
bootstrap/3.3.7
jquery/3.1.0

image

Has any progress been made on this, or is it basically being ignored because it is already closed?

This is still an issue. Is it still being looked at?

+1

Recently I came across the same error. The flatpickr was inside of a bootstrap modal. But only one flatpickr produced the RangeErrors. So I wondered and discovered that the error only occurs when the tabindex property is set on the modal root div.

<div class="modal fade" tabindex="-1" role="dialog">

Once I removed it, everything seems to work out just fine.

I don't know why, but somehow the tabindex property seems to be the problem.

as weird as it is @fabianallendorf 's solutions is the solution. I had tab-index="-1" as well once removed no errors anymore

using flatpickr v4.5.7

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zortext picture zortext  路  3Comments

anhskohbo picture anhskohbo  路  3Comments

mgohin picture mgohin  路  4Comments

mponton picture mponton  路  3Comments

deangibson89 picture deangibson89  路  3Comments