diff --git a/README.md b/README.md index 57fc72dee7..9d697c9e2b 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Fomantic includes an interactive installer to help setup your project. * IE 11[^2] * Microsoft Edge 12-44[^2] -[^1]: Fomantic-UI should basically still work in iOS Safari 7+, Android 4.4+, but, starting from v2.9.0, we won't support them anymore if anything works different than in recent versions. +[^1]: Fomantic-UI should basically still work in iOS Safari 9+, Android 4.4+, but, starting from v2.9.0, we won't support them anymore if anything works different than in recent versions. [^2]: Fomantic-UI should basically still work in IE11 / old Edge, but, starting from v2.9.0, we won't support them anymore in terms of dedicated bugfixes. --- diff --git a/src/definitions/behaviors/api.js b/src/definitions/behaviors/api.js index 388cd97670..a2e09b575e 100644 --- a/src/definitions/behaviors/api.js +++ b/src/definitions/behaviors/api.js @@ -977,7 +977,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index 34f0eab534..1d864d08c0 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -1426,7 +1426,7 @@ if ($allModules.length > 1) { title += ' (' + $allModules.length + ')'; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/behaviors/state.js b/src/definitions/behaviors/state.js index c794368531..00f195ead8 100644 --- a/src/definitions/behaviors/state.js +++ b/src/definitions/behaviors/state.js @@ -492,7 +492,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/behaviors/visibility.js b/src/definitions/behaviors/visibility.js index f3fc689518..ec673242a1 100755 --- a/src/definitions/behaviors/visibility.js +++ b/src/definitions/behaviors/visibility.js @@ -59,14 +59,6 @@ instance = $module.data(moduleNamespace), - requestAnimationFrame = window.requestAnimationFrame - || window.mozRequestAnimationFrame - || window.webkitRequestAnimationFrame - || window.msRequestAnimationFrame - || function (callback) { - setTimeout(callback, 0); - }, - element = this, disabled = false, @@ -1100,7 +1092,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/globals/site.js b/src/definitions/globals/site.js index 6e035af852..93e21f0ccd 100644 --- a/src/definitions/globals/site.js +++ b/src/definitions/globals/site.js @@ -60,45 +60,16 @@ }, normalize: function () { - module.fix.console(); - module.fix.requestAnimationFrame(); + // keep the function for backward compatibility + // eslint-disable-next-line no-useless-return + return; }, fix: { - console: function () { - module.debug('Normalizing window.console'); - if (console === undefined || console.log === undefined) { - module.verbose('Console not available, normalizing events'); - module.disable.console(); - } - if (console.group === undefined || console.groupEnd === undefined || console.groupCollapsed === undefined) { - module.verbose('Console group not available, normalizing events'); - window.console.group = function () {}; - window.console.groupEnd = function () {}; - window.console.groupCollapsed = function () {}; - } - if (console.markTimeline === undefined) { - module.verbose('Mark timeline not available, normalizing events'); - window.console.markTimeline = function () {}; - } - }, consoleClear: function () { module.debug('Disabling programmatic console clearing'); window.console.clear = function () {}; }, - requestAnimationFrame: function () { - module.debug('Normalizing requestAnimationFrame'); - if (window.requestAnimationFrame === undefined) { - module.debug('RequestAnimationFrame not available, normalizing event'); - window.requestAnimationFrame = window.requestAnimationFrame - || window.mozRequestAnimationFrame - || window.webkitRequestAnimationFrame - || window.msRequestAnimationFrame - || function (callback) { - setTimeout(callback, 0); - }; - } - }, }, moduleExists: function (name) { @@ -244,7 +215,7 @@ groupEnd: function () {}, info: function () {}, log: function () {}, - markTimeline: function () {}, + table: function () {}, warn: function () {}, }; } @@ -334,7 +305,7 @@ totalTime += data['Execution Time']; }); title += ' ' + totalTime + 'ms'; - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); @@ -441,21 +412,23 @@ 'dimmer', 'dropdown', 'embed', + 'flyout', 'form', 'modal', 'nag', 'popup', - 'slider', + 'progress', 'rating', + 'search', 'shape', 'sidebar', + 'slider', 'state', 'sticky', 'tab', 'toast', 'transition', 'visibility', - 'visit', ], siteNamespace: 'site', diff --git a/src/definitions/modules/accordion.js b/src/definitions/modules/accordion.js index 47d68c9ce0..5b9a928186 100644 --- a/src/definitions/modules/accordion.js +++ b/src/definitions/modules/accordion.js @@ -455,7 +455,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/calendar.js b/src/definitions/modules/calendar.js index 0b1f329b8a..99051d4a6f 100644 --- a/src/definitions/modules/calendar.js +++ b/src/definitions/modules/calendar.js @@ -1497,7 +1497,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/checkbox.js b/src/definitions/modules/checkbox.js index 815145c973..9c72ee2533 100644 --- a/src/definitions/modules/checkbox.js +++ b/src/definitions/modules/checkbox.js @@ -740,7 +740,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/dimmer.js b/src/definitions/modules/dimmer.js index 3ce62e5394..e426c1f4fd 100755 --- a/src/definitions/modules/dimmer.js +++ b/src/definitions/modules/dimmer.js @@ -548,7 +548,7 @@ if ($allModules.length > 1) { title += ' (' + $allModules.length + ')'; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 96aae50d26..435416ba46 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -3851,7 +3851,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/embed.js b/src/definitions/modules/embed.js index febaf884ba..ba7f13394f 100644 --- a/src/definitions/modules/embed.js +++ b/src/definitions/modules/embed.js @@ -461,7 +461,7 @@ if ($allModules.length > 1) { title += ' (' + $allModules.length + ')'; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/flyout.js b/src/definitions/modules/flyout.js index 7379a3ede0..35680bda25 100644 --- a/src/definitions/modules/flyout.js +++ b/src/definitions/modules/flyout.js @@ -37,14 +37,6 @@ methodInvoked = typeof query === 'string', queryArguments = [].slice.call(arguments, 1), - requestAnimationFrame = window.requestAnimationFrame - || window.mozRequestAnimationFrame - || window.webkitRequestAnimationFrame - || window.msRequestAnimationFrame - || function (callback) { - setTimeout(callback, 0); - }, - returnedValue ; @@ -437,14 +429,12 @@ style += '' + ' .ui.visible.' + direction + '.flyout ~ .fixed,' + ' .ui.visible.' + direction + '.flyout ~ .pusher {' - + ' -webkit-transform: translate3d(' + distance[direction] + 'px, 0, 0);' + ' transform: translate3d(' + distance[direction] + 'px, 0, 0);' + ' }'; } else if (direction === 'top' || direction === 'bottom') { style += '' + ' .ui.visible.' + direction + '.flyout ~ .fixed,' + ' .ui.visible.' + direction + '.flyout ~ .pusher {' - + ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' }'; } @@ -456,13 +446,11 @@ module.debug('Adding CSS rules for animation distance', width); style += '' + ' body.pushable > .ui.visible.' + direction + '.flyout ~ .pusher::after {' - + ' -webkit-transform: translate3d(' + distance[direction] + 'px, 0, 0);' + ' transform: translate3d(' + distance[direction] + 'px, 0, 0);' + ' }'; } else if (direction === 'top' || direction === 'bottom') { style += '' + ' body.pushable > .ui.visible.' + direction + '.flyout ~ .pusher::after {' - + ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' }'; } @@ -470,7 +458,6 @@ style += '' + ' body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher::after,' + ' body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher::after {' - + ' -webkit-transform: translate3d(0, 0, 0);' + ' transform: translate3d(0, 0, 0);' + ' }'; } @@ -1215,7 +1202,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index 54e0ee5cd7..a9d68faa12 100755 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -35,14 +35,6 @@ methodInvoked = typeof query === 'string', queryArguments = [].slice.call(arguments, 1), - requestAnimationFrame = window.requestAnimationFrame - || window.mozRequestAnimationFrame - || window.webkitRequestAnimationFrame - || window.msRequestAnimationFrame - || function (callback) { - setTimeout(callback, 0); - }, - returnedValue ; @@ -1221,7 +1213,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/nag.js b/src/definitions/modules/nag.js index c0f2e4d590..b0eeccdab4 100644 --- a/src/definitions/modules/nag.js +++ b/src/definitions/modules/nag.js @@ -382,7 +382,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index 51ed164463..406a17eb5d 100644 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -1238,7 +1238,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/progress.js b/src/definitions/modules/progress.js index f1bb682aed..e58a2dd9fe 100644 --- a/src/definitions/modules/progress.js +++ b/src/definitions/modules/progress.js @@ -835,7 +835,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/rating.js b/src/definitions/modules/rating.js index 3c8603616d..fa7854c43d 100644 --- a/src/definitions/modules/rating.js +++ b/src/definitions/modules/rating.js @@ -387,7 +387,7 @@ if ($allModules.length > 1) { title += ' (' + $allModules.length + ')'; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/search.js b/src/definitions/modules/search.js index 9eb27be7e9..e9175bd856 100644 --- a/src/definitions/modules/search.js +++ b/src/definitions/modules/search.js @@ -1163,7 +1163,7 @@ if ($allModules.length > 1) { title += ' (' + $allModules.length + ')'; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/shape.js b/src/definitions/modules/shape.js index 350cbf4616..04f6633252 100644 --- a/src/definitions/modules/shape.js +++ b/src/definitions/modules/shape.js @@ -30,14 +30,6 @@ methodInvoked = typeof query === 'string', queryArguments = [].slice.call(arguments, 1), - requestAnimationFrame = window.requestAnimationFrame - || window.mozRequestAnimationFrame - || window.webkitRequestAnimationFrame - || window.msRequestAnimationFrame - || function (callback) { - setTimeout(callback, 0); - }, - returnedValue ; @@ -216,10 +208,6 @@ if (settings.duration || settings.duration === 0) { $sides.add($side) .css({ - '-webkit-transition-duration': duration, - '-moz-transition-duration': duration, - '-ms-transition-duration': duration, - '-o-transition-duration': duration, 'transition-duration': duration, }) ; @@ -677,7 +665,7 @@ if ($allModules.length > 1) { title += ' (' + $allModules.length + ')'; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/sidebar.js b/src/definitions/modules/sidebar.js index 32af257271..59b6e1525f 100644 --- a/src/definitions/modules/sidebar.js +++ b/src/definitions/modules/sidebar.js @@ -37,14 +37,6 @@ methodInvoked = typeof query === 'string', queryArguments = [].slice.call(arguments, 1), - requestAnimationFrame = window.requestAnimationFrame - || window.mozRequestAnimationFrame - || window.webkitRequestAnimationFrame - || window.msRequestAnimationFrame - || function (callback) { - setTimeout(callback, 0); - }, - returnedValue; $allModules.each(function () { @@ -246,14 +238,12 @@ style += '' + ' .ui.visible.' + direction + '.sidebar ~ .fixed,' + ' .ui.visible.' + direction + '.sidebar ~ .pusher {' - + ' -webkit-transform: translate3d(' + distance[direction] + 'px, 0, 0);' + ' transform: translate3d(' + distance[direction] + 'px, 0, 0);' + ' }'; } else if (direction === 'top' || direction === 'bottom') { style += '' + ' .ui.visible.' + direction + '.sidebar ~ .fixed,' + ' .ui.visible.' + direction + '.sidebar ~ .pusher {' - + ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' }'; } @@ -265,13 +255,11 @@ module.debug('Adding CSS rules for animation distance', width); style += '' + ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher::after {' - + ' -webkit-transform: translate3d(' + distance[direction] + 'px, 0, 0);' + ' transform: translate3d(' + distance[direction] + 'px, 0, 0);' + ' }'; } else if (direction === 'top' || direction === 'bottom') { style += '' + ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher::after {' - + ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' transform: translate3d(0, ' + distance[direction] + 'px, 0);' + ' }'; } @@ -279,7 +267,6 @@ style += '' + ' body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher::after,' + ' body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher::after {' - + ' -webkit-transform: translate3d(0, 0, 0);' + ' transform: translate3d(0, 0, 0);' + ' }'; } @@ -937,7 +924,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/slider.js b/src/definitions/modules/slider.js index 5bac1f475a..4fd74f27f5 100644 --- a/src/definitions/modules/slider.js +++ b/src/definitions/modules/slider.js @@ -1194,7 +1194,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/sticky.js b/src/definitions/modules/sticky.js index 55e71edfbc..2d69f2eba7 100755 --- a/src/definitions/modules/sticky.js +++ b/src/definitions/modules/sticky.js @@ -55,14 +55,6 @@ instance = $module.data(moduleNamespace), - requestAnimationFrame = window.requestAnimationFrame - || window.mozRequestAnimationFrame - || window.webkitRequestAnimationFrame - || window.msRequestAnimationFrame - || function (callback) { - setTimeout(callback, 0); - }, - element = this, documentObserver, @@ -768,7 +760,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/tab.js b/src/definitions/modules/tab.js index f81def478e..33a582cb04 100644 --- a/src/definitions/modules/tab.js +++ b/src/definitions/modules/tab.js @@ -810,7 +810,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/toast.js b/src/definitions/modules/toast.js index cc8bce2089..96003ba980 100644 --- a/src/definitions/modules/toast.js +++ b/src/definitions/modules/toast.js @@ -707,7 +707,7 @@ if (moduleSelector) { title += ' \'' + moduleSelector + '\''; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance); diff --git a/src/definitions/modules/transition.js b/src/definitions/modules/transition.js index fbd4c958c0..c82f7eba7f 100644 --- a/src/definitions/modules/transition.js +++ b/src/definitions/modules/transition.js @@ -915,7 +915,7 @@ if ($allModules.length > 1) { title += ' (' + $allModules.length + ')'; } - if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) { + if (performance.length > 0) { console.groupCollapsed(title); if (console.table) { console.table(performance);