Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
0089596f
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0089596f
编写于
3月 02, 2020
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename isEdgeOrIE to isEdge
上级
7e4c8c98
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
11 addition
and
13 deletion
+11
-13
src/vs/base/browser/browser.ts
src/vs/base/browser/browser.ts
+0
-2
src/vs/base/browser/ui/scrollbar/scrollableElement.ts
src/vs/base/browser/ui/scrollbar/scrollableElement.ts
+2
-2
src/vs/editor/browser/controller/mouseHandler.ts
src/vs/editor/browser/controller/mouseHandler.ts
+1
-1
src/vs/editor/browser/controller/textAreaHandler.ts
src/vs/editor/browser/controller/textAreaHandler.ts
+2
-2
src/vs/editor/browser/controller/textAreaInput.ts
src/vs/editor/browser/controller/textAreaInput.ts
+3
-3
src/vs/editor/browser/viewParts/lines/viewLine.ts
src/vs/editor/browser/viewParts/lines/viewLine.ts
+1
-1
src/vs/editor/browser/viewParts/selections/selections.ts
src/vs/editor/browser/viewParts/selections/selections.ts
+1
-1
src/vs/editor/contrib/clipboard/clipboard.ts
src/vs/editor/contrib/clipboard/clipboard.ts
+1
-1
未找到文件。
src/vs/base/browser/browser.ts
浏览文件 @
0089596f
...
...
@@ -111,8 +111,6 @@ export const onDidChangeFullscreen = WindowManager.INSTANCE.onDidChangeFullscree
const
userAgent
=
navigator
.
userAgent
;
export
const
isEdge
=
(
userAgent
.
indexOf
(
'
Edge/
'
)
>=
0
);
export
const
isEdgeOrIE
=
isEdge
;
export
const
isOpera
=
(
userAgent
.
indexOf
(
'
Opera
'
)
>=
0
);
export
const
isFirefox
=
(
userAgent
.
indexOf
(
'
Firefox
'
)
>=
0
);
export
const
isWebKit
=
(
userAgent
.
indexOf
(
'
AppleWebKit
'
)
>=
0
);
...
...
src/vs/base/browser/ui/scrollbar/scrollableElement.ts
浏览文件 @
0089596f
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
'
vs/css!./media/scrollbars
'
;
import
{
isEdge
OrIE
}
from
'
vs/base/browser/browser
'
;
import
{
isEdge
}
from
'
vs/base/browser/browser
'
;
import
*
as
dom
from
'
vs/base/browser/dom
'
;
import
{
FastDomNode
,
createFastDomNode
}
from
'
vs/base/browser/fastDomNode
'
;
import
{
IMouseEvent
,
StandardWheelEvent
,
IMouseWheelEvent
}
from
'
vs/base/browser/mouseEvent
'
;
...
...
@@ -326,7 +326,7 @@ export abstract class AbstractScrollableElement extends Widget {
this
.
_onMouseWheel
(
new
StandardWheelEvent
(
browserEvent
));
};
this
.
_mouseWheelToDispose
.
push
(
dom
.
addDisposableListener
(
this
.
_listenOnDomNode
,
isEdge
OrIE
?
'
mousewheel
'
:
'
wheel
'
,
onMouseWheel
,
{
passive
:
false
}));
this
.
_mouseWheelToDispose
.
push
(
dom
.
addDisposableListener
(
this
.
_listenOnDomNode
,
isEdge
?
'
mousewheel
'
:
'
wheel
'
,
onMouseWheel
,
{
passive
:
false
}));
}
}
...
...
src/vs/editor/browser/controller/mouseHandler.ts
浏览文件 @
0089596f
...
...
@@ -119,7 +119,7 @@ export class MouseHandler extends ViewEventHandler {
e
.
stopPropagation
();
}
};
this
.
_register
(
dom
.
addDisposableListener
(
this
.
viewHelper
.
viewDomNode
,
browser
.
isEdge
OrIE
?
'
mousewheel
'
:
'
wheel
'
,
onMouseWheel
,
{
capture
:
true
,
passive
:
false
}));
this
.
_register
(
dom
.
addDisposableListener
(
this
.
viewHelper
.
viewDomNode
,
browser
.
isEdge
?
'
mousewheel
'
:
'
wheel
'
,
onMouseWheel
,
{
capture
:
true
,
passive
:
false
}));
this
.
_context
.
addEventHandler
(
this
);
}
...
...
src/vs/editor/browser/controller/textAreaHandler.ts
浏览文件 @
0089596f
...
...
@@ -53,7 +53,7 @@ class VisibleTextAreaData {
}
}
const
canUseZeroSizeTextarea
=
(
browser
.
isEdge
OrIE
||
browser
.
isFirefox
);
const
canUseZeroSizeTextarea
=
(
browser
.
isEdge
||
browser
.
isFirefox
);
export
class
TextAreaHandler
extends
ViewPart
{
...
...
@@ -283,7 +283,7 @@ export class TextAreaHandler extends ViewPart {
}));
this
.
_register
(
this
.
_textAreaInput
.
onCompositionUpdate
((
e
:
ICompositionData
)
=>
{
if
(
browser
.
isEdge
OrIE
)
{
if
(
browser
.
isEdge
)
{
// Due to isEdgeOrIE (where the textarea was not cleared initially)
// we cannot assume the text consists only of the composited text
this
.
_visibleTextArea
=
this
.
_visibleTextArea
!
.
setWidth
(
0
);
...
...
src/vs/editor/browser/controller/textAreaInput.ts
浏览文件 @
0089596f
...
...
@@ -191,7 +191,7 @@ export class TextAreaInput extends Disposable {
this
.
_isDoingComposition
=
true
;
// In IE we cannot set .value when handling 'compositionstart' because the entire composition will get canceled.
if
(
!
browser
.
isEdge
OrIE
)
{
if
(
!
browser
.
isEdge
)
{
this
.
_setAndWriteTextAreaState
(
'
compositionstart
'
,
TextAreaState
.
EMPTY
);
}
...
...
@@ -225,7 +225,7 @@ export class TextAreaInput extends Disposable {
// Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue.
// The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME,
// which breaks this path of code.
if
(
browser
.
isEdge
OrIE
&&
locale
===
'
ja
'
)
{
if
(
browser
.
isEdge
&&
locale
===
'
ja
'
)
{
return
true
;
}
...
...
@@ -266,7 +266,7 @@ export class TextAreaInput extends Disposable {
// Due to isEdgeOrIE (where the textarea was not cleared initially) and isChrome (the textarea is not updated correctly when composition ends)
// we cannot assume the text at the end consists only of the composited text
if
(
browser
.
isEdge
OrIE
||
browser
.
isChrome
)
{
if
(
browser
.
isEdge
||
browser
.
isChrome
)
{
this
.
_textAreaState
=
TextAreaState
.
readFromTextArea
(
this
.
_textArea
);
}
...
...
src/vs/editor/browser/viewParts/lines/viewLine.ts
浏览文件 @
0089596f
...
...
@@ -42,7 +42,7 @@ const canUseFastRenderedViewLine = (function () {
return
true
;
})();
const
alwaysRenderInlineSelection
=
(
browser
.
isEdge
OrIE
);
const
alwaysRenderInlineSelection
=
(
browser
.
isEdge
);
export
class
DomReadingContext
{
...
...
src/vs/editor/browser/viewParts/selections/selections.ts
浏览文件 @
0089596f
...
...
@@ -60,7 +60,7 @@ function toStyled(item: LineVisibleRanges): LineVisibleRangesWithStyle {
// TODO@Alex: Remove this once IE11 fixes Bug #524217
// The problem in IE11 is that it does some sort of auto-zooming to accomodate for displays with different pixel density.
// Unfortunately, this auto-zooming is buggy around dealing with rounded borders
const
isIEWithZoomingIssuesNearRoundedBorders
=
browser
.
isEdge
OrIE
;
const
isIEWithZoomingIssuesNearRoundedBorders
=
browser
.
isEdge
;
export
class
SelectionsOverlay
extends
DynamicViewOverlay
{
...
...
src/vs/editor/contrib/clipboard/clipboard.ts
浏览文件 @
0089596f
...
...
@@ -23,7 +23,7 @@ const CLIPBOARD_CONTEXT_MENU_GROUP = '9_cutcopypaste';
const
supportsCut
=
(
platform
.
isNative
||
document
.
queryCommandSupported
(
'
cut
'
));
const
supportsCopy
=
(
platform
.
isNative
||
document
.
queryCommandSupported
(
'
copy
'
));
// IE and Edge have trouble with setting html content in clipboard
const
supportsCopyWithSyntaxHighlighting
=
(
supportsCopy
&&
!
browser
.
isEdge
OrIE
);
const
supportsCopyWithSyntaxHighlighting
=
(
supportsCopy
&&
!
browser
.
isEdge
);
// Chrome incorrectly returns true for document.queryCommandSupported('paste')
// when the paste feature is available but the calling script has insufficient
// privileges to actually perform the action
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录