Bug
Pressing on a link inside a question description focuses the answer input.
Pressing on a link should open the link.
Tested page URL: https://plnkr.co/edit/SzheBTFLcoIqDweV
@MrKrabat Definitely a bug we will take a look.
Thank you,
Andrew
as a temporary workaround you can use the following code:
survey
.onAfterRenderQuestion.add(function(sender, options) {
var linkEl = options.htmlElement.querySelector(".sv-description").querySelector("a");
linkEl.onclick = function(e) {
e.stopPropagation();
}
});
here the updated example: https://plnkr.co/edit/5BGUcS3fhUruBoOn
We have the same problem with links in question titles, after updating the Surveyjs library they stopped working.
I have two code examples:
one on 1.7.20 with a working link in the question title:
https://plnkr.co/edit/v5k1kAulRHTcBoQj?preview
and one on 1.7.21 with a broken link:
https://plnkr.co/edit/3CGF37FasLcLR5UU?preview
The only difference between both examples is the version of the survey library. The problem must have been introduced in version 1.7.21.
Version 1.8.0 also has this problem.
https://github.com/surveyjs/survey-library/compare/v1.7.20...v1.7.21
Yes, this issue was tagged as v1.7.26, but no commit was made to fix it.
We did not find a general solution. We will disable focusing input element on clicking the title if markdown is used. I am going to work on it right now.
@MrKrabat @josvanderzalm I have fixed the issue. It was an error in our code in click function.
Thank you,
Andrew