CASH-2815 | Make click passthrough more robust
This commit is contained in:
parent
2e15c6120a
commit
140473fbf5
1 changed files with 15 additions and 13 deletions
|
|
@ -10,18 +10,17 @@
|
||||||
fontWeight="600"
|
fontWeight="600"
|
||||||
class="waitlist-label"
|
class="waitlist-label"
|
||||||
marginTopSizeOverride="0" />
|
marginTopSizeOverride="0" />
|
||||||
<checkboxQuestion
|
<div ref="checkboxWrapper">
|
||||||
class="mt-3"
|
<checkboxQuestion
|
||||||
cmsWidgetName="WaitListQuestionWidget"
|
class="mt-3"
|
||||||
v-model="localValue" />
|
cmsWidgetName="WaitListQuestionWidget"
|
||||||
</div>
|
v-model="localValue" />
|
||||||
<div
|
|
||||||
v-if="localValue"
|
|
||||||
class="rounded waitlist-success"
|
|
||||||
ref="waitlistSuccessMessage">
|
|
||||||
<img :src="waitListSuccessImage" class="success-image" />
|
|
||||||
<span v-html="waitListSuccessText" class="success-text"></span>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="localValue" class="rounded waitlist-success">
|
||||||
|
<img :src="waitListSuccessImage" class="success-image" alt="" />
|
||||||
|
<span v-html="waitListSuccessText" class="success-text"></span>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -66,7 +65,7 @@ export default {
|
||||||
},
|
},
|
||||||
waitlistThresholdDays() {
|
waitlistThresholdDays() {
|
||||||
return this.hasSetting(experimentSettings.WAITLIST_THRESHOLD_DAYS)
|
return this.hasSetting(experimentSettings.WAITLIST_THRESHOLD_DAYS)
|
||||||
? parseInt(this.getSettingValue(experimentSettings.WAITLIST_THRESHOLD_DAYS))
|
? parseInt(this.getSettingValue(experimentSettings.WAITLIST_THRESHOLD_DAYS), 10)
|
||||||
: 0;
|
: 0;
|
||||||
},
|
},
|
||||||
daysUntilEarliestAvailableDate() {
|
daysUntilEarliestAvailableDate() {
|
||||||
|
|
@ -88,7 +87,10 @@ export default {
|
||||||
handleContainerClick(event) {
|
handleContainerClick(event) {
|
||||||
// The checkbox's own label/input already toggles localValue natively,
|
// The checkbox's own label/input already toggles localValue natively,
|
||||||
// so ignore clicks that originate inside it to avoid double-toggling.
|
// so ignore clicks that originate inside it to avoid double-toggling.
|
||||||
if (event.target.closest(".ui-checkbox")) return;
|
// Checking against our own wrapper element (rather than an internal
|
||||||
|
// class name owned by checkboxQuestion) keeps this decoupled from
|
||||||
|
// that component's markup.
|
||||||
|
if (this.$refs.checkboxWrapper?.contains(event.target)) return;
|
||||||
this.localValue = !this.localValue;
|
this.localValue = !this.localValue;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue