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