roosterjs 8.40.1 → 8.40.2

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.
@@ -1,4 +1,4 @@
1
- // Type definitions for roosterjs (Version 8.40.1)
1
+ // Type definitions for roosterjs (Version 8.40.2)
2
2
  // Generated by dts tool from roosterjs
3
3
  // Project: https://github.com/Microsoft/roosterjs
4
4
 
@@ -7557,6 +7557,15 @@ var ImageSelection = /** @class */ (function () {
7557
7557
  }
7558
7558
  }
7559
7559
  break;
7560
+ case 5 /* MouseDown */:
7561
+ var mouseTarget = event.rawEvent.target;
7562
+ var mouseSelection = this.editor.getSelectionRangeEx();
7563
+ if (mouseSelection &&
7564
+ mouseSelection.type === 2 /* ImageSelection */ &&
7565
+ mouseSelection.image !== mouseTarget) {
7566
+ this.editor.select(null);
7567
+ }
7568
+ break;
7560
7569
  case 2 /* KeyUp */:
7561
7570
  var key = event.rawEvent.key;
7562
7571
  var keyDownSelection = this.editor.getSelectionRangeEx();
@@ -23036,10 +23045,8 @@ var ImageEdit = /** @class */ (function () {
23036
23045
  this.setEditingImage(null);
23037
23046
  break;
23038
23047
  case 7 /* ContentChanged */:
23039
- if (e.source !== "Format" /* Format */) {
23040
- // After contentChanged event, the current image wrapper may not be valid any more, remove all of them if any
23041
- this.removeWrapper();
23042
- }
23048
+ //After contentChanged event, the current image wrapper may not be valid any more, remove all of them if any
23049
+ this.removeWrapper();
23043
23050
  break;
23044
23051
  case 8 /* ExtractContentWithDom */:
23045
23052
  // When extract content, remove all image info since they may not be valid when load the content again
@@ -23781,9 +23788,9 @@ function getLatestZIndex(editorDiv) {
23781
23788
  var child = editorDiv;
23782
23789
  var zIndex = 0;
23783
23790
  while (child && (0, roosterjs_editor_dom_1.getTagOfNode)(child) !== 'BODY') {
23784
- var childZIndex = child.style.zIndex || getComputedStyle(child).zIndex;
23791
+ var childZIndex = parseInt(child.style.zIndex || getComputedStyle(child).zIndex, 10);
23785
23792
  if (childZIndex) {
23786
- zIndex = parseInt(child.style.zIndex);
23793
+ zIndex = Math.max(zIndex, childZIndex);
23787
23794
  }
23788
23795
  child = child.parentElement;
23789
23796
  }