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

Touch support - delete items? #6

Closed
mattpi opened this issue May 29, 2013 · 6 comments
Closed

Touch support - delete items? #6

mattpi opened this issue May 29, 2013 · 6 comments

Comments

@mattpi
Copy link

mattpi commented May 29, 2013

Works great on touch devices, with one exception, there's no way to delete multiple selected items.

@brianreavis
Copy link
Member

This should be an easy fix by keeping the input textbox in focus but hidden (this.focus(false)) so that the device keyboard stays up. I'll try to look into it this evening. Thanks!

@mattpi
Copy link
Author

mattpi commented May 30, 2013

Awesome, look forward to seeing that. I have to say, on the subject, it's not entirely obvious that multiple items are navigable / removable using the keyboard, hence the reason why other UI implementations, such as Select2, have a remove icon (x) option.

brianreavis added a commit that referenced this issue Jun 2, 2013
Fixes focus issues + the expandable keyboard hiding while using the control.
@brianreavis
Copy link
Member

It turns out this was more involved than I had thought—forcing an input to have focus is essentially impossible on mobile WebKit. To resolve this, I made some adjustments to ensure the input never loses focus while in use. It now should behave as it does on the desktop.

As for the point about adding an (x) to the selected items, that might be something worth looking into. In the short term, it wouldn't hurt to at least add some examples on how to do that with the API. I just created a separate issue for getting that demo done: #9.

When making this, I wondered how much that was a copout for development ease and lack of proper caret control. But maybe you're right, maybe the (x)'s should be part of the default behavior.

@brianreavis
Copy link
Member

@mattpi Check out "examples/plugins.html" for an example of the (x) remove icon. There's now a plugin that provides that functionality: "remove_button".

@kpwebb
Copy link

kpwebb commented Sep 19, 2013

I'm seeing a related problem on touch devices where it's impossible to clear the select box on a single select list. I can type text but I can backspace over an existing item to clear the select. Is this a known issue related to the above, or it this something new?

I'm adding the items programmaticly (both via ajax and vi direct JS entry via the API) but not sure if that's related to the clearing, as it works fine on non touch browsers.

@kpwebb
Copy link

kpwebb commented Sep 19, 2013

Ah, n/m looks like this is related to #113 not the above.

sg00dwin pushed a commit to sg00dwin/selectize.js that referenced this issue Jan 11, 2016
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

3 participants