salesforce-ux / design-system

Salesforce Lightning Design System
https://www.lightningdesignsystem.com
Other
3.57k stars 827 forks source link

Checkboxes do not work in Salesforce1 with iOS9 #32

Closed jmanchester41 closed 9 years ago

jmanchester41 commented 9 years ago

Working with a customer they noted that there was an issue with checkboxes on VF in Salesforce1. Funny thing is that this issue was only with iOS9. Simple code to re-produce this was:

After looking into this very extensively, I noticed the issue was caused by the ~'s in the CSS. .slds .slds-checkbox [type="checkbox"]:checked ~ .slds-checkbox--faux:after{ }

Easy fix was to just swap the "~" for a "+". Does anyone have any idea why this might be?

stefsullrew commented 9 years ago

That sounds like an iOS9 bug.

The ~ selector is a general sibling combinator. In the case of .foo ~ .bar it selects .bar even if it doesn't directly follow .foo. We have to use that since, there are cases where the tech stack someone is using inserts something in the DOM that we don't expect (wrapping something in a span, etc).

I will investigate and file a bug with Apple if needed.

jmanchester41 commented 9 years ago

Thanks for the follow-up.

stefsullrew commented 9 years ago

So far what I found is that it doesn't happen in Safari but only happens in iOS9 UIWebView. Checking to see if I can find a recent bug (there were bugs filed during the beta, but it wasn't fixed).

stefsullrew commented 9 years ago

@jmanchester41 - Do you have an image of what the problem looks like visually? (Is it broken functionally or visually broken?) I'm trying to file an exceptionally useful bug for Apple. (I haven't upgraded to iOS9 yet.)

Cheers!

stefsullrew commented 9 years ago

Also, they want this info: Version & Build: Found in Settings > General > About

jmanchester41 commented 9 years ago

Sorry for the late follow-up. I tried replying before and it was not submitting the Comment. Basically there is nothing visually wrong, it pretty much just ignores input on this field and never checks the box. Hope this helps.

stefsullrew commented 9 years ago

Yes, I figured it out. Thanks @jmanchester41 ... I filed the bug with Apple. If you need support for your app now, you can add the .slds .slds-checkbox [type="checkbox"]:checked + .slds-checkbox--faux:after selector. I'm considering having both of them there "for now" until we see what's going to happen with the bug fix. That would probably make it work for most folks. I'm going to close this for now. Cheers!

stefsullrew commented 9 years ago

We've added the above selectors to our code base as of SLDS 0.10.1 (in addition to the ~ selectors) ... This is a temporary fallback that should handle about 90% of cases.

Sunnydalelow commented 8 years ago

I'm experiencing a similar issue. None of the SF1 checkboxes render on iOS 8.4.1. See images here: http://screencast.com/t/tNvQfRkYnNDQ

kaelig commented 8 years ago

Thank you for reporting this, @Sunnydalelow. iOS 8.4.1 is not part of the list of supported systems, as it is not the latest version of iOS (see the FAQ).