提交 9c5907f7 编写于 作者: A Alex Dima

Debt: Remove workarounds for Chrome v56

上级 24042106
......@@ -157,12 +157,6 @@ export const isSafari = (userAgent.indexOf('Chrome') === -1) && (userAgent.index
export const isIPad = (userAgent.indexOf('iPad') >= 0);
export const isEdgeWebView = isEdge && (userAgent.indexOf('WebView/') >= 0);
export const isChromev56 = (
userAgent.indexOf('Chrome/56.') >= 0
// Edge likes to impersonate Chrome sometimes
&& userAgent.indexOf('Edge/') === -1
);
export function hasClipboardSupport() {
if (isIE) {
return false;
......
......@@ -29,15 +29,6 @@ function canUseTranslate3d(): boolean {
return false;
}
// see https://github.com/Microsoft/vscode/issues/24483
if (browser.isChromev56) {
const pixelRatio = browser.getPixelRatio();
if (Math.floor(pixelRatio) !== pixelRatio) {
// Not an integer
return false;
}
}
return true;
}
......
......@@ -205,15 +205,6 @@ export class TextAreaInput extends Disposable {
this._register(dom.addDisposableListener(textArea.domNode, 'compositionupdate', (e: CompositionEvent) => {
this._lastTextAreaEvent = TextAreaInputEventType.compositionupdate;
if (browser.isChromev56) {
// See https://github.com/Microsoft/monaco-editor/issues/320
// where compositionupdate .data is broken in Chrome v55 and v56
// See https://bugs.chromium.org/p/chromium/issues/detail?id=677050#c9
// The textArea doesn't get the composition update yet, the value of textarea is still obsolete
// so we can't correct e at this moment.
return;
}
if (compositionDataInValid(e.locale)) {
const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/false, /*couldBeTypingAtOffset0*/false);
this._textAreaState = newState;
......@@ -266,17 +257,6 @@ export class TextAreaInput extends Disposable {
this._textArea.setIgnoreSelectionChangeTime('received input event');
if (this._isDoingComposition) {
// See https://github.com/Microsoft/monaco-editor/issues/320
if (browser.isChromev56) {
const [newState, typeInput] = deduceComposition(this._textArea.getValue());
this._textAreaState = newState;
this._onType.fire(typeInput);
let e: ICompositionData = {
data: typeInput.text
};
this._onCompositionUpdate.fire(e);
}
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册