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

optgroup collapsible not working on mobile #1218

Open
KingMabuza opened this issue Dec 5, 2021 · 3 comments
Open

optgroup collapsible not working on mobile #1218

KingMabuza opened this issue Dec 5, 2021 · 3 comments

Comments

@KingMabuza
Copy link

Hi, the optgroup dropdown isn't working on mobile devices, when I click on the dropdown caret it doesn't display options, but works fine on desktop, please help.

fabian-steinberg added a commit to s-eckard/bootstrap-multiselect that referenced this issue Mar 18, 2022
… caret for (un-)collapsing group now on the left of the group text

- The caret for toggling the collapse and uncollapse of the group should now be slightly bigger and therefore easier to use on smaller mobile devices
- The caret also has been moved to the left of the header text, which should give it a bit more structure and make the dimensions of where you can click to collapse and uncollapse the group more obvious
- There is now multiple indents based on whether the group is selectable or not, because otherwise the indent would be too little and it would be hard to make out where a group begins and ends
fabian-steinberg added a commit to s-eckard/bootstrap-multiselect that referenced this issue Mar 18, 2022
fabian-steinberg added a commit to s-eckard/bootstrap-multiselect that referenced this issue Mar 25, 2022
@etamin419
Copy link

etamin419 commented Apr 27, 2023

Hello. Is the problem still not resolved? I also encountered the fact that in the mobile version it is not possible to open the group.
But I noticed that outside the list, you can open and hide the list. As if an object is superimposed on top of the list, preventing disclosure.
You can see it on the GIF

@FaresBadrCA
Copy link

To fix the scrolling and inability to expand/collapse the optgroup on mobile, I added this line after initializing the multiselect:

$('span.caret-container').on('touchstart', function(e) {e.stopPropagation();});

Additionally, I have these css properties:

.multiselect-container button.dropdown-item {
   pointer-events:none;
}
.multiselect-container span.form-check input {
   pointer-events: all;
   cursor: pointer;
}
.multiselect-container span.form-check label  {
   pointer-events: none;
}

.multiselect-container span.caret-container {
   pointer-events: all;
   cursor: pointer;
}

@khanhtoan122001
Copy link

To fix the scrolling and inability to expand/collapse the optgroup on mobile, I added this line after initializing the multiselect:

$('span.caret-container').on('touchstart', function(e) {e.stopPropagation();});

Additionally, I have these css properties:

.multiselect-container button.dropdown-item {
   pointer-events:none;
}
.multiselect-container span.form-check input {
   pointer-events: all;
   cursor: pointer;
}
.multiselect-container span.form-check label  {
   pointer-events: none;
}

.multiselect-container span.caret-container {
   pointer-events: all;
   cursor: pointer;
}

You save my life <3

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