Skip to content

Commit 11232d4

Browse files
committed
fix(ionRadio): fix adjacent selectors that break in iOS9
Closes #4347
1 parent 2449c48 commit 11232d4

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

Diff for: js/angular/directive/radio.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ IonicModule
3535
template:
3636
'<label class="item item-radio">' +
3737
'<input type="radio" name="radio-group">' +
38-
'<div class="item-content disable-pointer-events" ng-transclude></div>' +
39-
'<i class="radio-icon disable-pointer-events icon ion-checkmark"></i>' +
38+
'<div class="radio-content">'+
39+
'<div class="item-content disable-pointer-events" ng-transclude></div>' +
40+
'<i class="radio-icon disable-pointer-events icon ion-checkmark"></i>' +
41+
'</div>'+
4042
'</label>',
4143

4244
compile: function(element, attr) {

Diff for: scss/_radio.scss

+2-12
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,14 @@
3434
position: absolute;
3535
left: -9999px;
3636

37-
&:checked ~ .item-content {
37+
&:checked + .radio-content .item-content {
3838
/* style the item content when its checked */
3939
background: #f7f7f7;
4040
}
4141

42-
&:checked ~ .radio-icon {
42+
&:checked + .radio-content .radio-icon {
4343
/* show the checkmark icon when its checked */
4444
visibility: visible;
4545
}
4646
}
4747

48-
// Hack for Android to correctly display the checked item
49-
// http://timpietrusky.com/advanced-checkbox-hack
50-
.platform-android.grade-b .item-radio,
51-
.platform-android.grade-c .item-radio {
52-
-webkit-animation: androidCheckedbugfix infinite 1s;
53-
}
54-
@-webkit-keyframes androidCheckedbugfix {
55-
from { padding: 0; }
56-
to { padding: 0; }
57-
}

0 commit comments

Comments
 (0)