Skip to content

Commit

Permalink
Text Fragment wizard - clicking Edit in menu doesn't open Edit mode #…
Browse files Browse the repository at this point in the history
  • Loading branch information
ashklianko committed Sep 27, 2024
1 parent 2b8fd9b commit 42fac39
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ export class PageComponentsView
const removeHandler = () => {
const itemViewWrapper: ComponentsTreeItem = this.pageComponentsWrapper.getSelectedItems()[0];


if (itemViewWrapper) {
const path: ComponentPath = this.getPathByItem(itemViewWrapper);
PageEventsManager.get().notifyComponentRemoveRequested(path);
Expand Down Expand Up @@ -591,12 +590,16 @@ export class PageComponentsView

if (event.getType() === PageNavigationEventType.SELECT) {
const path: ComponentPath = event.getData().getPath();
this.lastSelectedPath = this.isItemSelected(path) ? null : path;
this.selectItemByPath(path).then(() => {
if (this.isUndocked && !this.isCollapsed()) {
this.scrollToItem(path);
}
}).catch(DefaultErrorHandler.handle);
const isItemSelected = this.isItemSelected(path);
this.lastSelectedPath = isItemSelected ? null : path;

if (!isItemSelected) {
this.selectItemByPath(path).then(() => {
if (this.isUndocked && !this.isCollapsed()) {
this.scrollToItem(path);
}
}).catch(DefaultErrorHandler.handle);
}

return;
}
Expand Down

0 comments on commit 42fac39

Please sign in to comment.