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

Chosen on iPad leaves behind cursor after selection #2857

Closed
jim-at-miramontes opened this issue Jul 29, 2017 · 4 comments
Closed

Chosen on iPad leaves behind cursor after selection #2857

jim-at-miramontes opened this issue Jul 29, 2017 · 4 comments

Comments

@jim-at-miramontes
Copy link

When you do a selection from a Chosen select on an iPad, a blinking cursor gets left behind after the selection (see below, from the Chosen webpage). The cursor disappears when the select loses focus.
img_0270

@koenpunt
Copy link
Collaborator

This is a known issue and has been accepted as such. See #2727 for more details.

@tammytee
Copy link

tammytee commented Feb 20, 2018

I encountered the same issue with Chosen on iPad. I've added the following lines to my style overrides for Chosen to only show the cursor when a select that has a search input is open:

.chosen-container {
    .chosen-search-input {
            user-select: none !important;
    }
    &.chosen-container-single-nosearch {
        .chosen-search-input {
             user-select: none !important;
        }
        &.chosen-with-drop .chosen-search-input {
             user-select: none !important;
        }
    }

    &.chosen-with-drop {
        .chosen-search-input {
            user-select: all !important;
        }
    }
}

@adamcadot
Copy link

adamcadot commented Apr 15, 2018

I got the code supplied by @tammytee to work by making it more general:

.disable-select
{
  -webkit-touch-callout: none !important; /* iOS Safari */
    -webkit-user-select: none !important; /* Safari */
     -khtml-user-select: none !important; /* Konqueror HTML */
       -moz-user-select: none !important; /* Firefox */
        -ms-user-select: none !important; /* Internet Explorer/Edge */
            user-select: none !important; /* Non-prefixed version, currently
                                             supported by Chrome and Opera */
}
.chosen-container
{
    .chosen-search-input
    {
            .disable-select;
    }
    &.chosen-container-single-nosearch
    {
        .chosen-search-input
        {
             .disable-select;
        }
        &.chosen-with-drop .chosen-search-input
        {
             .disable-select;
        }
    }
    &.chosen-with-drop
    {
      .disable-select;
    }
}

@jim-at-miramontes
Copy link
Author

jim-at-miramontes commented Apr 16, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants