gitana / alpaca

Alpaca provides the easiest way to generate interactive HTML5 forms for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking, dynamic user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.
http://www.alpacajs.org
Other
1.29k stars 371 forks source link

"too much recursion" with jQuery 3.4 using enum #764

Open brockfanning opened 2 years ago

brockfanning commented 2 years ago

This issue is easily fixed by using another version of jQuery other than 3.4 (like going up to 3.5.0 or going back to 3.3.1) but I thought I would post it here in case anyone else ran into it. Feel free to immediately close this - I just wanted it to be searchable.

This is a weird bug, but it really seems to happen... If using jQuery 3.4, and a field has an "enum" with 3 or fewer items, Alpaca fails with "too much recursion". Changing the enum to four or more items fixes the problem. And as mentioned above, changing the jQuery version also fixes the problem.

Here is an example: https://codepen.io/brockfanning/pen/oNWQJYr