mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Notebook cell and modal fix - follow up after Lucy's 14433. (#14457)
* Modal - added code to stop the keyboard event after it is handled. textCell and codeCell - onKey now fired on keydown. * Moved stop method into the conditional with Escape key.
This commit is contained in:
@@ -472,6 +472,7 @@ export abstract class Modal extends Disposable implements IThemable {
|
||||
if (event.equals(KeyCode.Enter)) {
|
||||
this.onAccept(event);
|
||||
} else if (event.equals(KeyCode.Escape)) {
|
||||
DOM.EventHelper.stop(e, true);
|
||||
this.onClose(event);
|
||||
} else if (event.equals(KeyMod.Shift | KeyCode.Tab)) {
|
||||
this.handleBackwardTab(e);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
-->
|
||||
<div style="width: 100%; height: 100%; display: flex; flex-flow: column" (keyup)="onKey($event)">
|
||||
<div style="width: 100%; height: 100%; display: flex; flex-flow: column" (keydown)="onKey($event)">
|
||||
<div style="flex: 0 0 auto;">
|
||||
<code-component [cellModel]="cellModel" [model]="model" [activeCellId]="activeCellId"></code-component>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
-->
|
||||
<div style="width: 100%; height: 100%; display: flex; flex-flow: column" (keyup)="onKey($event)" (mouseover)="hover=true" (mouseleave)="hover=false">
|
||||
<div style="width: 100%; height: 100%; display: flex; flex-flow: column" (keydown)="onKey($event)" (mouseover)="hover=true" (mouseleave)="hover=false">
|
||||
<markdown-toolbar-component #markdownToolbar *ngIf="isEditMode" [cellModel]="cellModel"></markdown-toolbar-component>
|
||||
<div class="notebook-text" [class.show-markdown]="markdownMode" [class.show-preview]="previewMode">
|
||||
<code-component *ngIf="markdownMode" [cellModel]="cellModel" (onContentChanged)="handleContentChanged()" [model]="model" [activeCellId]="activeCellId">
|
||||
|
||||
Reference in New Issue
Block a user