提交 6fc9bd19 编写于 作者: R Rob Lourens

Fix editor focus after using cell insert toolbar

上级 8b138320
......@@ -163,8 +163,9 @@ abstract class AbstractCellRenderer {
addCodeCell.tabIndex = 0;
const insertCellBelow = this.instantiationService.createInstance(InsertCodeCellAction);
disposables.add(DOM.addDisposableListener(addCodeCell, DOM.EventType.CLICK, () => {
disposables.add(DOM.addDisposableListener(addCodeCell, DOM.EventType.CLICK, e => {
this.actionRunner.run(insertCellBelow, context);
e.stopPropagation();
}));
disposables.add((DOM.addDisposableListener(addCodeCell, DOM.EventType.KEY_DOWN, async e => {
......@@ -181,8 +182,9 @@ abstract class AbstractCellRenderer {
addMarkdownCell.innerHTML = renderCodicons(escape('$(add) Markdown '));
addMarkdownCell.tabIndex = 0;
const insertMarkdownBelow = this.instantiationService.createInstance(InsertMarkdownCellAction);
disposables.add(DOM.addDisposableListener(addMarkdownCell, DOM.EventType.CLICK, () => {
disposables.add(DOM.addDisposableListener(addMarkdownCell, DOM.EventType.CLICK, e => {
this.actionRunner.run(insertMarkdownBelow, context);
e.stopPropagation();
}));
disposables.add((DOM.addDisposableListener(addMarkdownCell, DOM.EventType.KEY_DOWN, async e => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册