Skip to content

Commit

Permalink
fix(sidebar,flyout): remove unused ios checks
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lubber-de authored Sep 7, 2023
1 parent 86a6537 commit c6956f2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 61 deletions.
31 changes: 0 additions & 31 deletions src/definitions/modules/flyout.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@
.off(eventNamespace)
.removeData(moduleNamespace)
;
if (module.is.ios()) {
module.remove.ios();
}
$closeIcon.off(elementNamespace);
if ($inputs) {
$inputs.off(elementNamespace);
Expand Down Expand Up @@ -890,12 +887,6 @@
});
},

// ios only (scroll on html not document). This prevent auto-resize canvas/scroll in ios
// (This is no longer necessary in latest iOS)
ios: function () {
$html.addClass(className.ios);
},

// container
pushed: function () {
$context.addClass(className.pushed);
Expand Down Expand Up @@ -945,11 +936,6 @@
;
},

// ios scroll on html not document
ios: function () {
$html.removeClass(className.ios);
},

// context
pushed: function () {
$context.removeClass(className.pushed);
Expand Down Expand Up @@ -1071,20 +1057,6 @@

return module.cache.isIE;
},
ios: function () {
var
userAgent = navigator.userAgent,
isIOS = userAgent.match(regExp.ios),
isMobileChrome = userAgent.match(regExp.mobileChrome)
;
if (isIOS && !isMobileChrome) {
module.verbose('Browser was found to be iOS', userAgent);

return true;
}

return false;
},
mobile: function () {
var
userAgent = navigator.userAgent,
Expand Down Expand Up @@ -1431,7 +1403,6 @@
blurring: 'blurring',
closing: 'closing',
dimmed: 'dimmed',
ios: 'ios',
locked: 'locked',
pushable: 'pushable',
pushed: 'pushed',
Expand Down Expand Up @@ -1464,8 +1435,6 @@
},

regExp: {
ios: /(iPad|iPhone|iPod)/g,
mobileChrome: /(CriOS)/g,
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,
},

Expand Down
30 changes: 0 additions & 30 deletions src/definitions/modules/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@
.off(eventNamespace)
.removeData(moduleNamespace)
;
if (module.is.ios()) {
module.remove.ios();
}
// bound by uuid
$context.off(elementNamespace);
$window.off(elementNamespace);
Expand Down Expand Up @@ -595,11 +592,6 @@
$pusher.removeClass(className.blurring);
}
},
// ios only (scroll on html not document). This prevent auto-resize canvas/scroll in ios
// (This is no longer necessary in latest iOS)
ios: function () {
$html.addClass(className.ios);
},

// container
pushed: function () {
Expand Down Expand Up @@ -648,11 +640,6 @@
}
},

// ios scroll on html not document
ios: function () {
$html.removeClass(className.ios);
},

// context
pushed: function () {
$context.removeClass(className.pushed);
Expand Down Expand Up @@ -772,20 +759,6 @@
return module.cache.isIE;
},

ios: function () {
var
userAgent = navigator.userAgent,
isIOS = userAgent.match(regExp.ios),
isMobileChrome = userAgent.match(regExp.mobileChrome)
;
if (isIOS && !isMobileChrome) {
module.verbose('Browser was found to be iOS', userAgent);

return true;
}

return false;
},
mobile: function () {
var
userAgent = navigator.userAgent,
Expand Down Expand Up @@ -1045,7 +1018,6 @@
blurring: 'blurring',
closing: 'closing',
dimmed: 'dimmed',
ios: 'ios',
locked: 'locked',
pushable: 'pushable',
pushed: 'pushed',
Expand All @@ -1065,8 +1037,6 @@
},

regExp: {
ios: /(iPad|iPhone|iPod)/g,
mobileChrome: /(CriOS)/g,
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,
},

Expand Down

0 comments on commit c6956f2

Please sign in to comment.