@talrace/ngx-noder 19.0.24 → 19.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1718,11 +1718,11 @@ class OverlayService {
1718
1718
  this.openedSubscription = fromEvent(document, 'mousedown')
1719
1719
  .pipe(filter(event => {
1720
1720
  const clickTarget = event.target;
1721
- return this.overlayRef && !this.overlayRef.overlayElement.contains(clickTarget);
1721
+ return (this.overlayRef &&
1722
+ !this.overlayRef.overlayElement.contains(clickTarget) &&
1723
+ this.overlayRef.overlayElement.parentElement.parentElement.children.length === 1);
1722
1724
  }), take(1))
1723
- .subscribe(() => {
1724
- this.close();
1725
- });
1725
+ .subscribe(() => this.close());
1726
1726
  }
1727
1727
  getOverlayConfig(xPosition, yPosition) {
1728
1728
  return new OverlayConfig({
@@ -7988,6 +7988,7 @@ class Selection {
7988
7988
  }
7989
7989
  const column = PositionHelper.getApproximatePosition(session, line, this.keepLinePositionX);
7990
7990
  this.cursor = PositionHelper.screenToDocument(session, line, column);
7991
+ this.overlayService.close();
7991
7992
  }
7992
7993
  getCursorLeft(session) {
7993
7994
  if (this.cursor.row === 0 && this.cursor.column === 0) {