Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-checkbox breaks on mobile with Ionic #2085

Closed
CR88 opened this issue Mar 30, 2015 · 7 comments
Closed

md-checkbox breaks on mobile with Ionic #2085

CR88 opened this issue Mar 30, 2015 · 7 comments

Comments

@CR88
Copy link

CR88 commented Mar 30, 2015

Whenever I test on a mobile device, the checkboxes don't change, so if I set it to true from default, it stays true and isn't changeable. The ink animation does it's thing, but the box doesn't change it's value, and the tick doesn't change.

It works 100% fine on desktop, the issue is only with viewing on mobile devices.

EDIT: Also the buttons no longer work using ng-href or just href, but they do on desktop.

@ngraef
Copy link
Contributor

ngraef commented Mar 30, 2015

What OS & browser versions? Do you have a codepen demo? Checkboxes work fine for me on Android 5.0/Chrome 41.

@CR88
Copy link
Author

CR88 commented Mar 30, 2015

Works fine on: Safari Version 8.0.4 on OS X, Chrome Version 41.0.2272.104 on OS X, Firefox Version 36.0.4 on OS X

Doesn't work on Safari on iOS 8.1, you can test this via the Develop tab on Safari on OS X too,
Doesn't work on Chrome on Android 5.0, not sure what version of Chrome

This is my codepen
http://codepen.io/anon/pen/LEaMEd

@ngraef
Copy link
Contributor

ngraef commented Mar 30, 2015

Ah ok, you're using Ionic. There's a known issue with touch events. See #1826.

@CR88
Copy link
Author

CR88 commented Mar 30, 2015

The "8.3 Touch events not firing ng-click on Android/IOS hybrid apps/mobile browsers" issue had a solution in it that has fixed it, hopefully there will be a proper fix soon?

@buu700
Copy link

buu700 commented Mar 30, 2015

I was experiencing this this today as well; it seems to be a subset of issue #2090 (i.e. the event is being triggered twice, not zero times).

This temporary hack resolved it for me for now:

$('md-checkbox').click(function () {
    var $this   = $(this);

    setTimeout(function () {
        $this.css('pointer-events', '');
    }, 500);

    $this.css('pointer-events', 'none');
});

@ThomasBurleson ThomasBurleson added the for: internal contributor The team will address this issue and community PRs are not requested. label Apr 2, 2015
@ThomasBurleson ThomasBurleson changed the title md-checkbox breaks on mobile md-checkbox breaks on mobile with Ionic Apr 9, 2015
@ThomasBurleson ThomasBurleson added type: conflict and removed for: internal contributor The team will address this issue and community PRs are not requested. labels Apr 9, 2015
@ThomasBurleson
Copy link
Contributor

@buu700, @CR88 - can confirm that this issues has been resolved for you?
Closing for now.

@CR88
Copy link
Author

CR88 commented Apr 15, 2015

Yes, issue has been solved.

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

No branches or pull requests

6 participants