vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

fix(VMenu): allow enter keypress to work in input element

Open TIM56887 opened this issue 1 year ago • 0 comments

Description

fixes #19920 allow enter keypress to work in input element

Markup:

<template>
  <v-app>
    <v-container>
      <v-btn id="rootButton"> Open Menu 1 </v-btn>
      <v-menu
        v-model="menu1"
        :close-on-content-click="false"
        activator="#rootButton"
        height="300px"
        location="top"
        width="260px"
        persistent
      >
        <v-form @submit="submit">
          <v-card>
            <v-card-title> Menu 1 </v-card-title>
            <v-card-item>
              <v-row>
                <v-col cols="12">
                  <v-text-field v-model="menu1Text" label="Some text" />
                </v-col>
              </v-row>
            </v-card-item>
            <v-card-actions>
              <v-spacer />

              <v-btn variant="text"> Cancel </v-btn>
              <v-btn color="primary" variant="text" type="submit"> Save </v-btn>
            </v-card-actions>
          </v-card>
        </v-form>
      </v-menu>
    </v-container>
  </v-app>
</template>

<script setup lang="ts">
  import { Ref, ref } from 'vue'

  const menu1: Ref<boolean> = ref(false)
  const menu1Text: Ref<string> = ref('')
  const submit = () => console.log('submitted')
</script>

TIM56887 avatar May 30 '24 09:05 TIM56887