Skip to content

How to prioritise the link in the q-checkbox label, when clicked? #17034

Discussion options

You must be logged in to vote

A little more digging got me the answer I needed. Basically I needed to add @click.stop to the a tag to stop propagation:

<q-checkbox
  v-model="account.agreeToTerms"
>
  <i18n-t
    keypath="text.readPrivacyPolicy.text"
    tag="span"
  >
    <template #url>
    <a
      :href="agreementUrl"
      target="_blank"
      @click.stop
    >
      {{ $t('text.readPrivacyPolicy.link') }}
    </a>
    </template>
  </i18n-t>
</q-checkbox> 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ajmas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant