roosterjs 8.35.0 → 8.35.1

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.35.0)
1
+ // Type definitions for roosterjs (Version 8.35.1)
2
2
  // Generated by dts tool from roosterjs
3
3
  // Project: https://github.com/Microsoft/roosterjs
4
4
 
package/dist/rooster.js CHANGED
@@ -19871,6 +19871,7 @@ var AutoFormat = /** @class */ (function () {
19871
19871
  */
19872
19872
  AutoFormat.prototype.dispose = function () {
19873
19873
  this.editor = null;
19874
+ this.lastKeyTyped = null;
19874
19875
  };
19875
19876
  /**
19876
19877
  * Handle events triggered from editor
@@ -19888,7 +19889,7 @@ var AutoFormat = /** @class */ (function () {
19888
19889
  }
19889
19890
  if (event.eventType === 0 /* KeyDown */) {
19890
19891
  var keyTyped = event.rawEvent.key;
19891
- if (keyTyped.length > 1) {
19892
+ if (keyTyped && keyTyped.length > 1) {
19892
19893
  this.lastKeyTyped = '';
19893
19894
  }
19894
19895
  if (this.lastKeyTyped === '-' &&
@@ -19917,7 +19918,7 @@ var AutoFormat = /** @class */ (function () {
19917
19918
  }
19918
19919
  }, "Format" /* Format */, true /*canUndoByBackspace*/, { formatApiName: 'autoHyphen' });
19919
19920
  //After the substitution the last key typed needs to be cleaned
19920
- this.lastKeyTyped = '';
19921
+ this.lastKeyTyped = null;
19921
19922
  }
19922
19923
  else {
19923
19924
  this.lastKeyTyped = keyTyped;