mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -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)) {
|
if (event.equals(KeyCode.Enter)) {
|
||||||
this.onAccept(event);
|
this.onAccept(event);
|
||||||
} else if (event.equals(KeyCode.Escape)) {
|
} else if (event.equals(KeyCode.Escape)) {
|
||||||
|
DOM.EventHelper.stop(e, true);
|
||||||
this.onClose(event);
|
this.onClose(event);
|
||||||
} else if (event.equals(KeyMod.Shift | KeyCode.Tab)) {
|
} else if (event.equals(KeyMod.Shift | KeyCode.Tab)) {
|
||||||
this.handleBackwardTab(e);
|
this.handleBackwardTab(e);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* 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;">
|
<div style="flex: 0 0 auto;">
|
||||||
<code-component [cellModel]="cellModel" [model]="model" [activeCellId]="activeCellId"></code-component>
|
<code-component [cellModel]="cellModel" [model]="model" [activeCellId]="activeCellId"></code-component>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* 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>
|
<markdown-toolbar-component #markdownToolbar *ngIf="isEditMode" [cellModel]="cellModel"></markdown-toolbar-component>
|
||||||
<div class="notebook-text" [class.show-markdown]="markdownMode" [class.show-preview]="previewMode">
|
<div class="notebook-text" [class.show-markdown]="markdownMode" [class.show-preview]="previewMode">
|
||||||
<code-component *ngIf="markdownMode" [cellModel]="cellModel" (onContentChanged)="handleContentChanged()" [model]="model" [activeCellId]="activeCellId">
|
<code-component *ngIf="markdownMode" [cellModel]="cellModel" (onContentChanged)="handleContentChanged()" [model]="model" [activeCellId]="activeCellId">
|
||||||
|
|||||||
Reference in New Issue
Block a user