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"
|
||||
class="waitlist-label"
|
||||
marginTopSizeOverride="0" />
|
||||
<checkboxQuestion
|
||||
class="mt-3"
|
||||
cmsWidgetName="WaitListQuestionWidget"
|
||||
v-model="localValue" />
|
||||
</div>
|
||||
<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 ref="checkboxWrapper">
|
||||
<checkboxQuestion
|
||||
class="mt-3"
|
||||
cmsWidgetName="WaitListQuestionWidget"
|
||||
v-model="localValue" />
|
||||
</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>
|
||||
|
||||
|
|
@ -66,7 +65,7 @@ export default {
|
|||
},
|
||||
waitlistThresholdDays() {
|
||||
return this.hasSetting(experimentSettings.WAITLIST_THRESHOLD_DAYS)
|
||||
? parseInt(this.getSettingValue(experimentSettings.WAITLIST_THRESHOLD_DAYS))
|
||||
? parseInt(this.getSettingValue(experimentSettings.WAITLIST_THRESHOLD_DAYS), 10)
|
||||
: 0;
|
||||
},
|
||||
daysUntilEarliestAvailableDate() {
|
||||
|
|
@ -88,7 +87,10 @@ export default {
|
|||
handleContainerClick(event) {
|
||||
// The checkbox's own label/input already toggles localValue natively,
|
||||
// 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;
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue