@syncfusion/ej2-richtexteditor 19.3.53 → 19.3.55

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.
@@ -5660,6 +5660,11 @@ class QuickToolbar {
5660
5660
  this.parent.isBlur = false;
5661
5661
  this.parent.isRTE = true;
5662
5662
  }
5663
+ keyUpQT(e) {
5664
+ if (e.which == 27) {
5665
+ this.hideQuickToolbars();
5666
+ }
5667
+ }
5663
5668
  renderQuickToolbars() {
5664
5669
  if (this.linkQTBar || this.imageQTBar || this.textQTBar || this.tableQTBar) {
5665
5670
  return;
@@ -5674,15 +5679,19 @@ class QuickToolbar {
5674
5679
  this.renderFactory.addRenderer(RenderType.TableToolbar, this.tableQTBar);
5675
5680
  if (this.linkQTBar) {
5676
5681
  EventHandler.add(this.linkQTBar.element, 'mousedown', this.onMouseDown, this);
5682
+ EventHandler.add(this.linkQTBar.element, 'keyup', this.keyUpQT, this);
5677
5683
  }
5678
5684
  if (this.imageQTBar) {
5679
5685
  EventHandler.add(this.imageQTBar.element, 'mousedown', this.onMouseDown, this);
5686
+ EventHandler.add(this.imageQTBar.element, 'keyup', this.keyUpQT, this);
5680
5687
  }
5681
5688
  if (this.textQTBar) {
5682
5689
  EventHandler.add(this.textQTBar.element, 'mousedown', this.onMouseDown, this);
5690
+ EventHandler.add(this.textQTBar.element, 'keyup', this.keyUpQT, this);
5683
5691
  }
5684
5692
  if (this.tableQTBar) {
5685
5693
  EventHandler.add(this.tableQTBar.element, 'mousedown', this.onMouseDown, this);
5694
+ EventHandler.add(this.tableQTBar.element, 'keyup', this.keyUpQT, this);
5686
5695
  }
5687
5696
  }
5688
5697
  renderInlineQuickToolbar() {
@@ -5691,6 +5700,7 @@ class QuickToolbar {
5691
5700
  this.inlineQTBar = this.createQTBar('Inline', 'MultiRow', this.parent.toolbarSettings.items, RenderType.InlineToolbar);
5692
5701
  this.renderFactory.addRenderer(RenderType.InlineToolbar, this.inlineQTBar);
5693
5702
  EventHandler.add(this.inlineQTBar.element, 'mousedown', this.onMouseDown, this);
5703
+ EventHandler.add(this.inlineQTBar.element, 'keyup', this.keyUpQT, this);
5694
5704
  }
5695
5705
  }
5696
5706
  /**
@@ -5843,22 +5853,27 @@ class QuickToolbar {
5843
5853
  destroy() {
5844
5854
  if (this.linkQTBar) {
5845
5855
  EventHandler.remove(this.linkQTBar.element, 'mousedown', this.onMouseDown);
5856
+ EventHandler.remove(this.linkQTBar.element, 'keyup', this.keyUpQT);
5846
5857
  this.linkQTBar.destroy();
5847
5858
  }
5848
5859
  if (this.textQTBar) {
5849
5860
  EventHandler.remove(this.textQTBar.element, 'mousedown', this.onMouseDown);
5861
+ EventHandler.remove(this.textQTBar.element, 'keyup', this.keyUpQT);
5850
5862
  this.textQTBar.destroy();
5851
5863
  }
5852
5864
  if (this.imageQTBar) {
5853
5865
  EventHandler.remove(this.imageQTBar.element, 'mousedown', this.onMouseDown);
5866
+ EventHandler.remove(this.imageQTBar.element, 'keyup', this.keyUpQT);
5854
5867
  this.imageQTBar.destroy();
5855
5868
  }
5856
5869
  if (this.tableQTBar) {
5857
5870
  EventHandler.remove(this.tableQTBar.element, 'mousedown', this.onMouseDown);
5871
+ EventHandler.remove(this.tableQTBar.element, 'keyup', this.keyUpQT);
5858
5872
  this.tableQTBar.destroy();
5859
5873
  }
5860
5874
  if (this.inlineQTBar) {
5861
5875
  EventHandler.remove(this.inlineQTBar.element, 'mousedown', this.onMouseDown);
5876
+ EventHandler.remove(this.inlineQTBar.element, 'keyup', this.keyUpQT);
5862
5877
  if (isIDevice()) {
5863
5878
  EventHandler.remove(document, 'selectionchange', this.selectionChangeHandler);
5864
5879
  }