traits sometime does not fire event
Question
sometime traits change event does not fire event on model and view and I have seen below error for that.
Uncaught RangeError: Maximum call stack size exceeded. at HTMLDivElement.<anonymous> (grapes.min.js:9229) at o (grapes.min.js:8871) at i.each (grapes.min.js:9131) at i.trigger (grapes.min.js:9228) at i.o.trigger (grapes.min.js:23251) at i.o.click (grapes.min.js:23274) at F.i.openSettings (grapesjs-hsbc.js:1232) at HTMLDivElement.<anonymous> (grapes.min.js:9229) at o (grapes.min.js:8871) at i.each (grapes.min.js:9131)
Answers (3)
@krunal039 about what event are you talking about? Can you provide at least an example of how reproduce it
@artf below is codepen link and i have added custom component named slider. here when you drop slider to editor and than click on it and it should open trait manager and if you change Link Title or Link to Open to blank value it throws above error.
https://codepen.io/kmpdev/full/LORdOM/
error:
Uncaught RangeError: Maximum call stack size exceeded. 2grapes.min.js:2 Uncaught RangeError: Maximum call stack size exceeded. at HTMLDivElement.<anonymous> (https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.25/grapes.min.js:2:232013) at o (https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.25/grapes.min.js:2:225570) at i.each (https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.25/grapes.min.js:2:230006) at i.trigger (https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.25/grapes.min.js:2:231987) at i.o.trigger (https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.25/grapes.min.js:11:29611) at i.o.click (https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.25/grapes.min.js:11:30120) at i.openSettings (pen.js:1921:20) at HTMLDivElement.<anonymous> (https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.25/grapes.min.js:2:232013) at o (https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.25/grapes.min.js:2:225570) at i.each (https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.25/grapes.min.js:2:230006)
I can't reproduce any error, but what I see wrong at the first look is how you update models
...
someModel.attributes.href = this.get("a_href");
// use
someModel.set('href', this.get("a_href"));
then you don't need $(this.el), you have already this.$el
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1927
[QUESTIONS] Sender.set('active') error Maximum call stack size exceeded
I have a button with the show-left command, I want to make when the button is clicked a second time (or more) remains active, but when runn...
Issue #1520
[Bug] On this.components() Error : Uncaught TypeError: Cannot read property 'each' of undefined
Get below error for this.components() not sure if it is bug or I am doing something wrong. Uncaught TypeError: Cannot read property 'each'...
Issue #397
Change value of Traits on the base of previous Traits.
Hello I am using two dropdowns in traits. On the selected value of the First drop down I am going to call an API and set data into another...
Issue #1003
[Question/ bug]"Uncaught TypeError: t.get is not a function" on adding select-comp
on adding button "select" component { id : 'select', className : 'fa fa-mouse-pointer', command : 'select-comp', }, in button's panels gett...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.