Reporting a bug
If the SurveyJS editor has been opened in the current angular session, the SurveyJS survey viewer will not work.
The SurveyJS survey viewer should work.
https://next.plnkr.co/edit/h0AatAXjD48CyWHr?preview
Click 'Open Survey' and then 'Open Editor' - Take note how both are properly rendered.
Refresh, click 'Open Editor', scroll down and click 'Open Survey' - Take note how the Survey will never render.
Note: The issue does not persist when building on surveyjs version 1.0.68, this is a new bug.
We've encountered this in 1.0.83 too.
This is the same issue as Survey not able to rerender after Survey Creator has rendered #23.
The workaround in that thread works for me...
...
console.log("init survey");
function surveyFix() {
var surveyContentParentNode = null;
var surveyContentNode = document.getElementById("survey-content");
var isRenderedBefore = !!surveyContentNode;
if (isRenderedBefore) {
surveyContentParentNode = surveyContentNode.parentNode;
surveyContentParentNode.parentNode.removeChild(surveyContentParentNode);
}
}
surveyFix();
surveyModel.render("surveyElement");
It's a bug. We're working on the fix.
Temporary workaround is to use KnockoutJS of v < 3.5.0, e.g. 3.4.2
We've fixed the issue. Fix will be available in the nearest update, most likely next tuesday.
Hello,
This issue is back again, the rendering fails when attempting to render a second time in Angular.
Thanks to check this again.
Here is the plunker from the TS with the survey libraries v1.7.4 - https://plnkr.co/edit/NaSnTAfkQiaKScf9
It works ok for me. How we can reproduce the issue?