Skip to content

Commit c6956f2

Browse files
authored
fix(sidebar,flyout): remove unused ios checks
This PR removes leftover and unused/ineffective code to check for ios browsers. The whole codebase does not have any class reference to .ios anymore. This was already removed in SUI 2.2.11 almost 6 years ago via Semantic-Org/Semantic-UI@da0aff0 , but it was forgotten to clean up the code entirely. As set.ios as well as any .ios selector was removed, any additional codechecks don't have any impact, so it's safe to delete without tagging as breaking change
1 parent 86a6537 commit c6956f2

File tree

2 files changed

+0
-61
lines changed

2 files changed

+0
-61
lines changed

src/definitions/modules/flyout.js

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,6 @@
233233
.off(eventNamespace)
234234
.removeData(moduleNamespace)
235235
;
236-
if (module.is.ios()) {
237-
module.remove.ios();
238-
}
239236
$closeIcon.off(elementNamespace);
240237
if ($inputs) {
241238
$inputs.off(elementNamespace);
@@ -890,12 +887,6 @@
890887
});
891888
},
892889

893-
// ios only (scroll on html not document). This prevent auto-resize canvas/scroll in ios
894-
// (This is no longer necessary in latest iOS)
895-
ios: function () {
896-
$html.addClass(className.ios);
897-
},
898-
899890
// container
900891
pushed: function () {
901892
$context.addClass(className.pushed);
@@ -945,11 +936,6 @@
945936
;
946937
},
947938

948-
// ios scroll on html not document
949-
ios: function () {
950-
$html.removeClass(className.ios);
951-
},
952-
953939
// context
954940
pushed: function () {
955941
$context.removeClass(className.pushed);
@@ -1071,20 +1057,6 @@
10711057

10721058
return module.cache.isIE;
10731059
},
1074-
ios: function () {
1075-
var
1076-
userAgent = navigator.userAgent,
1077-
isIOS = userAgent.match(regExp.ios),
1078-
isMobileChrome = userAgent.match(regExp.mobileChrome)
1079-
;
1080-
if (isIOS && !isMobileChrome) {
1081-
module.verbose('Browser was found to be iOS', userAgent);
1082-
1083-
return true;
1084-
}
1085-
1086-
return false;
1087-
},
10881060
mobile: function () {
10891061
var
10901062
userAgent = navigator.userAgent,
@@ -1431,7 +1403,6 @@
14311403
blurring: 'blurring',
14321404
closing: 'closing',
14331405
dimmed: 'dimmed',
1434-
ios: 'ios',
14351406
locked: 'locked',
14361407
pushable: 'pushable',
14371408
pushed: 'pushed',
@@ -1464,8 +1435,6 @@
14641435
},
14651436

14661437
regExp: {
1467-
ios: /(iPad|iPhone|iPod)/g,
1468-
mobileChrome: /(CriOS)/g,
14691438
mobile: /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g,
14701439
},
14711440

src/definitions/modules/sidebar.js

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@
129129
.off(eventNamespace)
130130
.removeData(moduleNamespace)
131131
;
132-
if (module.is.ios()) {
133-
module.remove.ios();
134-
}
135132
// bound by uuid
136133
$context.off(elementNamespace);
137134
$window.off(elementNamespace);
@@ -595,11 +592,6 @@
595592
$pusher.removeClass(className.blurring);
596593
}
597594
},
598-
// ios only (scroll on html not document). This prevent auto-resize canvas/scroll in ios
599-
// (This is no longer necessary in latest iOS)
600-
ios: function () {
601-
$html.addClass(className.ios);
602-
},
603595

604596
// container
605597
pushed: function () {
@@ -648,11 +640,6 @@
648640
}
649641
},
650642

651-
// ios scroll on html not document
652-
ios: function () {
653-
$html.removeClass(className.ios);
654-
},
655-
656643
// context
657644
pushed: function () {
658645
$context.removeClass(className.pushed);
@@ -772,20 +759,6 @@
772759
return module.cache.isIE;
773760
},
774761

775-
ios: function () {
776-
var
777-
userAgent = navigator.userAgent,
778-
isIOS = userAgent.match(regExp.ios),
779-
isMobileChrome = userAgent.match(regExp.mobileChrome)
780-
;
781-
if (isIOS && !isMobileChrome) {
782-
module.verbose('Browser was found to be iOS', userAgent);
783-
784-
return true;
785-
}
786-
787-
return false;
788-
},
789762
mobile: function () {
790763
var
791764
userAgent = navigator.userAgent,
@@ -1045,7 +1018,6 @@
10451018
blurring: 'blurring',
10461019
closing: 'closing',
10471020
dimmed: 'dimmed',
1048-
ios: 'ios',
10491021
locked: 'locked',
10501022
pushable: 'pushable',
10511023
pushed: 'pushed',
@@ -1065,8 +1037,6 @@
10651037
},
10661038

10671039
regExp: {
1068-
ios: /(iPad|iPhone|iPod)/g,
1069-
mobileChrome: /(CriOS)/g,
10701040
mobile: /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g,
10711041
},
10721042

0 commit comments

Comments
 (0)