VueJS: Imagepicker: Duplicate value prop in imagepicker.vue's generated render function
See original GitHub issueBUG: Refactoring of several question types occurred between R1.8.79 and R1.9.0, including modifications to the Image Picker question. One of these changes has caused the render function for the image picker to contain a duplicate “value” property which yields errors in certain browsers.
What is the current behavior?
When using survey-vue library in an application and loading that application in IE11 you will receive a: “Multiple definitions of a property not allowed in strict mode” in the console.
Tracked this down to the following line in survey-vue.js:
domProps: { value: item.value, value: _vm.question.value },
this appears on line 13038 in R1.9.0 and 13168 in R1.9.5
Seems likely that this was related to the image-picker refactoring here
What is the expected behavior?
Non-duplicate value prop in domProps / no IE11 console errors
- browser: IE11
- browser version: 1809
- surveyjs platform: vue
- surveyjs version: 1.9.0+
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
Yes, I see. The issue is related to inputType branching logic in VueJS implementation. The thing is that imagepicker question returns inputType checkbox or radio only and even shouldn’t go in the third branch with
domProps: { value: item.value, value: _vm.question.value },
We’ll discuss this issue and update this thread
No - you don’t even need to be in the image picker sample. Opening ANY of the samples in IE11 will cause the issue since the problem is in the generated code of the npm package itself.
Here is another example - if you navigate to this sample for the basic “Text” question via IE11 you will see the same errors: https://surveyjs.io/Examples/Library?id=questiontype-text&platform=Vue&theme=modern