Skip to content

Commit

Permalink
Make tabindex=-1 for LayoutComponent spo user cab use DELETE key to d…
Browse files Browse the repository at this point in the history
…elete the corresponding element. Ensure that modelunit is never deleted this way.
  • Loading branch information
joswarmer committed Oct 29, 2024
1 parent bf155ce commit 2cd315e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
id="{id}"
class:layout-component-horizontal="{isHorizontal}"
class:layout-component-vertical="{!isHorizontal}"
tabindex="-1"
bind:this={element}
>
{#if isHorizontal }
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/editor/FreEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ export class FreEditor {
deleteBox(box: Box) {
LOGGER.log("deleteBox " + box.id);
const node: FreNode = box.node;
if (node.freIsUnit()) {
return
}
const ownerDescriptor: FreOwnerDescriptor = node.freOwnerDescriptor();
if (ownerDescriptor !== null) {
const role: string = RoleProvider.property(ownerDescriptor.owner.freLanguageConcept(), ownerDescriptor.propertyName);
Expand Down

0 comments on commit 2cd315e

Please sign in to comment.