Skip to content

bug: Cannot select text in IonItem IonLabel when there is a IonButton present (Ionic 5, VueJS) #24956

Description

@maelp

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

When adding an ion-item like this, I can select the text of the ion-label in a browser using the mouse (it highlights the text that I select and I can copy it)

        <ion-list v-if="items.length > 0">
          <ion-item v-for="item in items" :key="item.key">
            <ion-label>{{ item.id }}</ion-label>
          </ion-item>
        </ion-list>

but if I add a ion-button to it, the text can no longer be selected

        <ion-list v-if="items.length > 0">
          <ion-item v-for="item in items" :key="item.key">
            <ion-label>{{ item.id }}</ion-label>
            <ion-button slot="end">action</ion-button>
          </ion-item>
        </ion-list>

Expected Behavior

The text should be selectable and copyable in a browser independently of the presence of a ion-button

Steps to Reproduce

  • create a ionic item such as above
  • try to select the text

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 6.18.1 (/Users/primet/.node/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 5.8.5

Capacitor:

Capacitor CLI : 3.3.1
@capacitor/android : 3.4.3
@capacitor/core : 3.4.1
@capacitor/ios : 3.3.1

Utility:

cordova-res (update available: 0.15.4) : 0.15.3
native-run : 1.5.0

System:

NodeJS : v16.14.0 (/usr/local/bin/node)
npm : 8.3.1
OS : macOS Monterey

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions