mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 01:25:37 -05:00
Correctly set focus on new Notebook cells after clicking on inline buttons. (#6708)
This commit is contained in:
@@ -11,11 +11,11 @@
|
||||
<loading-spinner [loading]="isLoading"></loading-spinner>
|
||||
<div class="hoverButtonsContainer" *ngIf="(cells && cells.length > 0) && !isLoading">
|
||||
<span class="containerBackground"></span>
|
||||
<button class="hoverButton" (click)="addCell('code', 0)">
|
||||
<button class="hoverButton" (click)="addCell('code', 0, $event)">
|
||||
<div class="addCodeIcon"></div>
|
||||
<span>{{addCodeLabel}}</span>
|
||||
</button>
|
||||
<button class="hoverButton" (click)="addCell('markdown', 0)">
|
||||
<button class="hoverButton" (click)="addCell('markdown', 0, $event)">
|
||||
<div class="addTextIcon"></div>
|
||||
<span>{{addTextLabel}}</span>
|
||||
</button>
|
||||
@@ -29,11 +29,11 @@
|
||||
</div>
|
||||
<div class="hoverButtonsContainer">
|
||||
<span class="containerBackground"></span>
|
||||
<button class="hoverButton" (click)="addCell('code', findCellIndex(cell) + 1)">
|
||||
<button class="hoverButton" (click)="addCell('code', findCellIndex(cell) + 1, $event)">
|
||||
<div class="addCodeIcon"></div>
|
||||
<span>{{addCodeLabel}}</span>
|
||||
</button>
|
||||
<button class="hoverButton" (click)="addCell('markdown', findCellIndex(cell) + 1)">
|
||||
<button class="hoverButton" (click)="addCell('markdown', findCellIndex(cell) + 1, $event)">
|
||||
<div class="addTextIcon"></div>
|
||||
<span>{{addTextLabel}}</span>
|
||||
</button>
|
||||
|
||||
@@ -200,7 +200,10 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
}
|
||||
|
||||
// Add cell based on cell type
|
||||
public addCell(cellType: CellType, index?: number) {
|
||||
public addCell(cellType: CellType, index?: number, event?: Event) {
|
||||
if (event) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
this._model.addCell(cellType, index);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user