slate-angular 16.1.0-next.0 → 16.1.0-next.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.
@@ -2818,24 +2818,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
2818
2818
 
2819
2819
  const SLATE_DEFAULT_LEAF_COMPONENT_TOKEN = new InjectionToken('slate-default-leaf-token');
2820
2820
 
2821
- const createThrottleRAF = () => {
2822
- let timerId = null;
2823
- const throttleRAF = (fn) => {
2824
- const scheduleFunc = () => {
2825
- timerId = requestAnimationFrame(() => {
2826
- timerId = null;
2827
- fn();
2828
- });
2829
- };
2830
- if (timerId !== null) {
2831
- cancelAnimationFrame(timerId);
2832
- timerId = null;
2833
- }
2834
- scheduleFunc();
2835
- };
2836
- return throttleRAF;
2837
- };
2838
-
2839
2821
  // not correctly clipboardData on beforeinput
2840
2822
  const forceOnDOMPaste = IS_SAFARI;
2841
2823
  class SlateEditable {
@@ -2877,7 +2859,6 @@ class SlateEditable {
2877
2859
  this.getOutletElement = () => {
2878
2860
  return this.elementRef.nativeElement;
2879
2861
  };
2880
- this.throttleRAF = createThrottleRAF();
2881
2862
  }
2882
2863
  ngOnInit() {
2883
2864
  this.editor.injector = this.injector;
@@ -3030,15 +3011,11 @@ class SlateEditable {
3030
3011
  // we need to check and do the right thing here.
3031
3012
  if (Range.isBackward(selection)) {
3032
3013
  // eslint-disable-next-line max-len
3033
- this.throttleRAF(() => {
3034
- domSelection.setBaseAndExtent(newDomRange.endContainer, newDomRange.endOffset, newDomRange.startContainer, newDomRange.startOffset);
3035
- });
3014
+ domSelection.setBaseAndExtent(newDomRange.endContainer, newDomRange.endOffset, newDomRange.startContainer, newDomRange.startOffset);
3036
3015
  }
3037
3016
  else {
3038
3017
  // eslint-disable-next-line max-len
3039
- this.throttleRAF(() => {
3040
- domSelection.setBaseAndExtent(newDomRange.startContainer, newDomRange.startOffset, newDomRange.endContainer, newDomRange.endOffset);
3041
- });
3018
+ domSelection.setBaseAndExtent(newDomRange.startContainer, newDomRange.startOffset, newDomRange.endContainer, newDomRange.endOffset);
3042
3019
  }
3043
3020
  }
3044
3021
  else {