Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Minor

robindekkers7b1420734107
diff --git a/ui/component/or-survey-results/src/style.ts b/ui/component/or-survey-results/src/style.ts
index 1d7b25162..cdc268312 100644
--- a/ui/component/or-survey-results/src/style.ts
+++ b/ui/component/or-survey-results/src/style.ts
@@ -5,9 +5,9 @@ export const surveyResultStyle = html`
:host {
width: 100%;
background-color: #FFFFFF;
+ --internal-or-survey-results-max-width: var(--or-survey-results-max-width, 0);
}
-
.flex {
-ms-flex: 1 1 0.000000001px;
-webkit-flex: 1;
@@ -77,6 +77,7 @@ export const surveyResultStyle = html`
padding-top: 20px;
margin: auto;
width: 100%;
+ max-width: var(--internal-or-survey-results-max-width)
overflow-x: scroll;
}
diff --git a/ui/component/or-survey/src/index.ts b/ui/component/or-survey/src/index.ts
index 3b4d3b8e6..812840ba9 100644
--- a/ui/component/or-survey/src/index.ts
+++ b/ui/component/or-survey/src/index.ts
@@ -369,13 +369,14 @@ class OrSurvey extends LitElement {
this.nextQuestion();
}
else if (this.getType(currQuestion.type) === "multiSelect") {
- if (!(target instanceof HTMLLabelElement)) {
+ if (!(target instanceof HTMLButtonElement) && !(target instanceof HTMLLabelElement)) {
return;
}
+
if (target.dataset.autoforward == "true") {
this.nextQuestion();
} else {
- if(currQuestion && currQuestion.id && surveyAnswers) {
+ if(currQuestion && currQuestion.id && surveyAnswers && target instanceof HTMLLabelElement) {
if (!surveyAnswers[currQuestion.id]) {
surveyAnswers[currQuestion.id] = [];
}