Skip to content

Commit

Permalink
Drop Legacy Edge support.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Oct 26, 2020
1 parent 1b6caf6 commit 340a921
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 125 deletions.
2 changes: 1 addition & 1 deletion .browserslistrc
Expand Up @@ -5,7 +5,7 @@ last 1 major version
not dead
Chrome >= 60
Firefox >= 60
Edge >= 16
not Edge < 79
iOS >= 10
Safari >= 10
Android >= 6
Expand Down
7 changes: 0 additions & 7 deletions js/src/dom/event-handler.js
Expand Up @@ -6,7 +6,6 @@
*/

import { getjQuery } from '../util/index'
import { defaultPreventedPreservedOnDispatch } from './polyfill'

/**
* ------------------------------------------------------------------------
Expand Down Expand Up @@ -314,12 +313,6 @@ const EventHandler = {

if (defaultPrevented) {
evt.preventDefault()

if (!defaultPreventedPreservedOnDispatch) {
Object.defineProperty(evt, 'defaultPrevented', {
get: () => true
})
}
}

if (nativeDispatch) {
Expand Down
17 changes: 1 addition & 16 deletions js/src/dom/polyfill.js
Expand Up @@ -12,20 +12,6 @@ import { getUID } from '../util/index'
let find = Element.prototype.querySelectorAll
let findOne = Element.prototype.querySelector

// MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
const defaultPreventedPreservedOnDispatch = (() => {
const e = new CustomEvent('Bootstrap', {
cancelable: true
})

const element = document.createElement('div')
element.addEventListener('Bootstrap', () => null)

e.preventDefault()
element.dispatchEvent(e)
return e.defaultPrevented
})()

const scopeSelectorRegex = /:scope\b/
const supportScopeQuery = (() => {
const element = document.createElement('div')
Expand Down Expand Up @@ -81,6 +67,5 @@ if (!supportScopeQuery) {

export {
find,
findOne,
defaultPreventedPreservedOnDispatch
findOne
}
7 changes: 0 additions & 7 deletions js/tests/browsers.js
Expand Up @@ -23,13 +23,6 @@ const browsers = {
browser: 'Firefox',
browser_version: 'latest'
},
edgeWin10: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Edge',
browser_version: '16'
},
chromeWin10: {
base: 'BrowserStack',
os: 'Windows',
Expand Down
2 changes: 0 additions & 2 deletions js/tests/visual/tooltip.html
Expand Up @@ -12,8 +12,6 @@
height: 50px;
border: 1px solid;
margin-left: 50px;
-webkit-transform: rotate(270deg);
-ms-transform: rotate(270deg);
transform: rotate(270deg);
margin-top: 100px;
}
Expand Down
16 changes: 2 additions & 14 deletions scss/_reboot.scss
Expand Up @@ -295,8 +295,6 @@ samp {
// 1. Remove browser default top margin
// 2. Reset browser default of `1em` to use `rem`s
// 3. Don't allow content to break outside
// 4. Disable auto-hiding scrollbar in legacy Edge to avoid overlap,
// making it impossible to interact with the content

pre {
display: block;
Expand All @@ -305,7 +303,6 @@ pre {
overflow: auto; // 3
@include font-size($code-font-size);
color: $pre-color;
-ms-overflow-style: scrollbar; // 4

// Account for some code outputs that place code tags in pre tags
code {
Expand Down Expand Up @@ -434,13 +431,6 @@ textarea {
line-height: inherit;
}

// Show the overflow in Edge

button,
input {
overflow: visible;
}

// Remove the inheritance of text transform in Firefox

button,
Expand Down Expand Up @@ -516,8 +506,7 @@ fieldset {

// 1. By using `float: left`, the legend will behave like a block element.
// This way the border of a fieldset wraps around the legend if present.
// 2. Correct the text wrapping in Edge.
// 3. Fix wrapping bug.
// 2. Fix wrapping bug.
// See https://github.com/twbs/bootstrap/issues/29712

legend {
Expand All @@ -528,10 +517,9 @@ legend {
@include font-size($legend-font-size);
font-weight: $legend-font-weight;
line-height: inherit;
white-space: normal; // 2

+ * {
clear: left; // 3
clear: left; // 2
}
}

Expand Down
45 changes: 0 additions & 45 deletions scss/forms/_form-range.scss
Expand Up @@ -18,7 +18,6 @@
// No box-shadow() mixin for focus accessibility.
&::-webkit-slider-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
&::-moz-range-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
&::-ms-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
}

&::-moz-focus-outer {
Expand Down Expand Up @@ -78,46 +77,6 @@
@include box-shadow($form-range-track-box-shadow);
}

&::-ms-thumb {
width: $form-range-thumb-width;
height: $form-range-thumb-height;
margin-top: 0; // Edge specific
margin-right: $form-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
margin-left: $form-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
@include gradient-bg($form-range-thumb-bg);
border: $form-range-thumb-border;
@include border-radius($form-range-thumb-border-radius);
@include box-shadow($form-range-thumb-box-shadow);
@include transition($form-range-thumb-transition);
appearance: none;

&:active {
@include gradient-bg($form-range-thumb-active-bg);
}
}

&::-ms-track {
width: $form-range-track-width;
height: $form-range-track-height;
color: transparent;
cursor: $form-range-track-cursor;
background-color: transparent;
border-color: transparent;
border-width: $form-range-thumb-height / 2;
@include box-shadow($form-range-track-box-shadow);
}

&::-ms-fill-lower {
background-color: $form-range-track-bg;
@include border-radius($form-range-track-border-radius);
}

&::-ms-fill-upper {
margin-right: 15px; // arbitrary?
background-color: $form-range-track-bg;
@include border-radius($form-range-track-border-radius);
}

&:disabled {
pointer-events: none;

Expand All @@ -128,9 +87,5 @@
&::-moz-range-thumb {
background-color: $form-range-thumb-disabled-bg;
}

&::-ms-thumb {
background-color: $form-range-thumb-disabled-bg;
}
}
}
10 changes: 0 additions & 10 deletions scss/forms/_form-select.scss
Expand Up @@ -33,16 +33,6 @@
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: $form-select-focus-box-shadow;
}

&::-ms-value {
// For visual consistency with other platforms/browsers,
// suppress the default white text on blue background highlight given to
// the selected option text when the (still closed) <select> receives focus
// in Edge.
// See https://github.com/twbs/bootstrap/issues/19398.
color: $input-color;
background-color: $input-bg;
}
}

&[multiple],
Expand Down
1 change: 0 additions & 1 deletion site/assets/scss/_component-examples.scss
Expand Up @@ -273,7 +273,6 @@
padding: 1rem;
margin-bottom: 1rem;
background-color: $gray-100;
-ms-overflow-style: -ms-autohiding-scrollbar;

@include media-breakpoint-up(sm) {
padding: 1rem 1.5rem;
Expand Down
21 changes: 0 additions & 21 deletions site/content/docs/5.0/examples/floating-labels/floating-labels.css
Expand Up @@ -51,10 +51,6 @@ body {
color: transparent;
}

.form-label-group input::-ms-input-placeholder {
color: transparent;
}

.form-label-group input::placeholder {
color: transparent;
}
Expand Down Expand Up @@ -82,20 +78,3 @@ body {
font-size: 12px;
color: #777;
}

/* Fallback for Edge
-------------------------------------------------- */
@supports (-ms-ime-align: auto) {
.form-label-group {
display: flex;
flex-direction: column-reverse;
}

.form-label-group label {
position: static;
}

.form-label-group input::-ms-input-placeholder {
color: #777;
}
}
4 changes: 4 additions & 0 deletions site/content/docs/5.0/migration.md
Expand Up @@ -9,6 +9,10 @@ toc: true

## v5.0.0-alpha3

### Browser support

- Dropped support for Microsoft Legacy Edge. See [here](#browser-support-1) for the previous browser support changes.

### Colors

- The color system which worked with `color-level()` and `$theme-color-interval` was removed in favor of a new color system.
Expand Down
1 change: 0 additions & 1 deletion site/layouts/_default/examples.html
Expand Up @@ -23,7 +23,6 @@
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

Expand Down

0 comments on commit 340a921

Please sign in to comment.