Remove support for IE11

Fixes #1889
This commit is contained in:
Daniel Imms
2019-06-09 15:52:37 -07:00
parent 566f5944dd
commit 02868c1033
5 changed files with 5 additions and 29 deletions
+1 -7
View File
@@ -85,13 +85,7 @@ The xterm.js team maintains the following addons but they can be built by anyone
## Browser Support
Since xterm.js is typically implemented as a developer tool, only modern browsers are supported officially. Here is a list of the versions we aim to support:
- Chrome latest
- Edge latest
- Firefox latest
- Safari latest
- IE11
Since xterm.js is typically implemented as a developer tool, only modern browsers are supported officially. Specifically the latest versions of *Chrome*, *Edge*, *Firefox* and *Safari*.
Xterm.js works seamlessly in [Electron](https://electronjs.org/) apps and may even work on earlier versions of the browsers, these are the versions we strive to keep working.
+4 -16
View File
@@ -38,12 +38,7 @@ export function bracketTextForPaste(text: string, bracketedPasteMode: boolean):
* @param ev The original copy event to be handled
*/
export function copyHandler(ev: ClipboardEvent, term: ITerminal, selectionManager: ISelectionManager): void {
if (term.browser.isMSIE) {
window.clipboardData.setData('Text', selectionManager.selectionText);
} else {
ev.clipboardData.setData('text/plain', selectionManager.selectionText);
}
ev.clipboardData.setData('text/plain', selectionManager.selectionText);
// Prevent or the original text will be copied.
ev.preventDefault();
}
@@ -66,16 +61,9 @@ export function pasteHandler(ev: ClipboardEvent, term: ITerminal): void {
term.cancel(ev);
};
if (term.browser.isMSIE) {
if (window.clipboardData) {
text = window.clipboardData.getData('Text');
dispatchPaste(text);
}
} else {
if (ev.clipboardData) {
text = ev.clipboardData.getData('text/plain');
dispatchPaste(text);
}
if (ev.clipboardData) {
text = ev.clipboardData.getData('text/plain');
dispatchPaste(text);
}
}
-4
View File
@@ -890,10 +890,6 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
: ev.which !== null && ev.which !== undefined
? ev.which - 1
: null;
if (Browser.isMSIE) {
button = button === 1 ? 0 : button === 4 ? 1 : button;
}
break;
case 'mouseup':
button = 3;
-1
View File
@@ -365,7 +365,6 @@ export interface IBrowser {
userAgent: string;
platform: string;
isFirefox: boolean;
isMSIE: boolean;
isMac: boolean;
isIpad: boolean;
isIphone: boolean;
-1
View File
@@ -19,7 +19,6 @@ const platform = (isNode) ? 'node' : navigator.platform;
export const isFirefox = !!~userAgent.indexOf('Firefox');
export const isSafari = /^((?!chrome|android).)*safari/i.test(userAgent);
export const isMSIE = !!~userAgent.indexOf('MSIE') || !!~userAgent.indexOf('Trident');
// Find the users platform. We use this to interpret the meta key
// and ISO third level shifts.