提交 30a642af 编写于 作者: J Johannes Rieken

preventDefault on mouse event such that the editor stays focused, fixes #12246

上级 889c5d2d
......@@ -44,8 +44,8 @@ export class LightBulbWidget implements IContentWidget, IDisposable {
this.domNode.style.width = '20px';
this.domNode.style.height = '20px';
this.domNode.className = 'lightbulb-glyph';
this.toDispose.push(dom.addDisposableListener(this.domNode, 'mousedown', (e) => {
this.editor.focus();
this.toDispose.push(dom.addDisposableListener(this.domNode, 'mousedown', (e:MouseEvent) => {
e.preventDefault();
this.onclick(this.position);
}));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册