buberdds / angular-bootstrap-colorpicker

Native AngularJS colorpicker directive. No dependency on jQuery or jQuery plugin is required.
MIT License
419 stars 226 forks source link

How to close colorpicker on touch screen? #15

Closed perqa closed 11 years ago

perqa commented 11 years ago

Hello! This is a great Directive! I am using it in a mobile app, and it works fine except that I can't seem to close it once it's open. How would I go about it?

buberdds commented 11 years ago

Hi, to trigger close event you have to click on a document (anywhere outside the colorpicker). That is true that on mobile devices it is not so clear. That's why I extended the picker template with a new fancy close button ;) check out the demo page.

perqa commented 11 years ago

Hello! Yes, I know you have to click on the document outside the colorpicker to close it. I first developed a web app, and now I'm converting it to mobile. But on my iPad, it didn't help tapping outside the colorpicker. It just never closed. Anyway, I'm very grateful that you've added a close button! I will check it out a s a p.

buberdds commented 11 years ago

Oh, I hope that click event on a button will work. Document is listening on a mousedown event and on iOS it should be touchstart event, as far as I know. Anyway, I'm waiting for Your feedback.

perqa commented 11 years ago

Yes, the close button (cross) works fine! Thanks a lot.

buberdds commented 11 years ago

You're welcome. By the way, thanks for opening this issue. I'll try to extend the colorpicker directive with touch events in the near future.

ivanferrer commented 5 years ago

Color-dragging does not work in touch mode. Example funcional