angular-bootstrap-checkbox icon indicating copy to clipboard operation
angular-bootstrap-checkbox copied to clipboard

Mobile browser support

Open hitchcockwill opened this issue 10 years ago • 2 comments

Checkbox does not register a click on mobile Safari or Chrome. Any suggestions for a workaround for this?

Update: Just did some more digging. It looks like the click event that is bound in the directive is not properly binding on mobile. Note that my app does have ngTouch included.

elem.bind("click", function() {
  console.log('This was clicked') // This never gets logged on mobile
  scope.$apply(function() {
    if(modelCtrl.$modelValue === falseValue) {
      modelCtrl.$setViewValue(trueValue);
    } else {
      modelCtrl.$setViewValue(falseValue);
    }
  });
});

hitchcockwill avatar Sep 17 '15 19:09 hitchcockwill

Thanks for reporting, I will test this as soon I get my hands on a mobile device.

sebastianha avatar Sep 20 '15 11:09 sebastianha

Submitted a pull request for this issue: https://github.com/sebastianha/angular-bootstrap-checkbox/pull/22

hitchcockwill avatar Sep 22 '15 21:09 hitchcockwill