Quasar: QRadio/QCheckbox/QToggle selecting label text

Created on 8 Sep 2020  路  4Comments  路  Source: quasarframework/quasar

Describe the bug
Clicking same QToggle multiple times selects label text on Chrome & Edge, but works fine on Firefox

To Reproduce
Steps to reproduce the behavior:

  1. Click 2+ times on QToggle component while using chrome/edge

Screenshots
Imgur

Platform (please complete the following information):
Browsers: Chrome Version 85.0.4183.83 (Official Build) (64-bit) / Edge Version 85.0.564.44 (Official build) (64-bit)

bug

All 4 comments

For now, you can use <q-toggle style="user-select: none"></q-toggle>.
But, I think, you've already tried that.

Hi,

From a framework perspective, we cannot disallow text selecting. The label content can be anything and maybe devs want users to be able to select text, or depending on the content then the selection might actually be necessary.

@rstoenescu I'm not saying users shouldn't be able to select text. But the text shouldn't be selected while clicking toggle button.
Here is example:
Left is youtube, Right is quasar
Difference (GIF)

Solution:

<div class="q-toggle__inner relative-position no-pointer-events q-toggle__inner--truthy">

Into (removing: .no-pointer-events)

<div class="q-toggle__inner relative-position q-toggle__inner--truthy">

and in css of .q-toggle__inner add

.q-toggle__inner {
/* Add */
pointer-events: auto !important;
}

Results (GIF)

Thanks for insisting on this.
Found a way to fix the whole gang (QRadio/QCheckbox/QToggle).

Will be available in Quasar v1.13.3.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jean-moldovan picture jean-moldovan  路  3Comments

Bangood picture Bangood  路  3Comments

jigarzon picture jigarzon  路  3Comments

green-mike picture green-mike  路  3Comments

slowaways picture slowaways  路  3Comments