Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(VCombobox): mobile browser UX issue on focus #18090

Open
wants to merge 1 commit into
base: v2-stable
Choose a base branch
from

Conversation

shiouming
Copy link

fixes #13562

Description

  1. Android Chrome user enters text NOT from item list into a combobox, then de-focus from the component.
  2. With previous input text in place, user taps that combobox again for changing input. On focus, the component will auto selects the input text.
  3. This auto input text selection triggers mobile browser's context menu for text selection (with options like copy, cut, select all, translate, etc.)
  4. As this context menu popup interrupts the UI, user has to manually dismiss it before proceeding her/his action, thus poor UX.

This auto input text selection feature seems have been removed from v3. I'm unable to reproduce it in v3. This PR is only for v2.

Refer discussion #13562 for more background. Another dev reported this issue on iOS Safari.

Markup:

<template>
  <v-container>
    <v-combobox></v-combobox>
  </v-container>
</template>

<script>
  export default {
    data: () => ({
    }),
  }
</script>
@KaelWD
Copy link
Member

KaelWD commented Aug 21, 2023

preventDefault on contextmenu seems to stop this on android

@shiouming
Copy link
Author

@KaelWD
Indeed, this could be a workaround, though I only tested it on Android (I don't have iphone with me, hope someone from the team can test it out).
The side effect would be, unlike other input fields, users will be losing the ability to bring up context menu - probably not a concern as we're talking about combobox/autocomplete.

What is your take? Remove the auto text selection or leave the auto contextmenu popup as default behaviour?

By the way, do you know why in v3 this auto text selection behaviour is not happening? Was it intentionally removed or just pending for implementation?

@KaelWD
Copy link
Member

KaelWD commented Aug 23, 2023

You could probably only prevent it if the field was just focused.

Was it intentionally removed

Dunno, could have just been an oversight.

@MajesticPotatoe MajesticPotatoe added T: bug Functionality that does not work as intended/expected C: VCombobox VCombobox labels Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VCombobox VCombobox T: bug Functionality that does not work as intended/expected
3 participants