@textbus/platform-browser 3.7.2 → 3.7.4

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.
@@ -369,6 +369,7 @@ let SelectionBridge = class SelectionBridge {
369
369
  }
370
370
  minLeft = rect2.left;
371
371
  minTop = rect2.top;
372
+ oldPosition = position;
372
373
  }
373
374
  if (isToPrevLine) {
374
375
  if (rect2.left < startLeft) {
@@ -1691,7 +1692,7 @@ let MagicInput = class MagicInput extends Input {
1691
1692
  this.handleDefaultActions(textarea);
1692
1693
  }
1693
1694
  handleDefaultActions(textarea) {
1694
- this.subscription.add(fromEvent(document, 'copy').subscribe(ev => {
1695
+ this.subscription.add(fromEvent(isFirefox() ? textarea : document, 'copy').subscribe(ev => {
1695
1696
  const selection = this.selection;
1696
1697
  if (!selection.isSelected) {
1697
1698
  return;
@@ -2067,7 +2068,7 @@ let NativeInput = class NativeInput extends Input {
2067
2068
  this.subscription.unsubscribe();
2068
2069
  }
2069
2070
  handleDefaultActions(textarea) {
2070
- this.subscription.add(fromEvent(document, 'copy').subscribe(ev => {
2071
+ this.subscription.add(fromEvent(isFirefox() ? textarea : document, 'copy').subscribe(ev => {
2071
2072
  const selection = this.selection;
2072
2073
  if (!selection.isSelected) {
2073
2074
  return;
package/bundles/index.js CHANGED
@@ -371,6 +371,7 @@ exports.SelectionBridge = class SelectionBridge {
371
371
  }
372
372
  minLeft = rect2.left;
373
373
  minTop = rect2.top;
374
+ oldPosition = position;
374
375
  }
375
376
  if (isToPrevLine) {
376
377
  if (rect2.left < startLeft) {
@@ -1693,7 +1694,7 @@ exports.MagicInput = class MagicInput extends Input {
1693
1694
  this.handleDefaultActions(textarea);
1694
1695
  }
1695
1696
  handleDefaultActions(textarea) {
1696
- this.subscription.add(stream.fromEvent(document, 'copy').subscribe(ev => {
1697
+ this.subscription.add(stream.fromEvent(isFirefox() ? textarea : document, 'copy').subscribe(ev => {
1697
1698
  const selection = this.selection;
1698
1699
  if (!selection.isSelected) {
1699
1700
  return;
@@ -2069,7 +2070,7 @@ exports.NativeInput = class NativeInput extends Input {
2069
2070
  this.subscription.unsubscribe();
2070
2071
  }
2071
2072
  handleDefaultActions(textarea) {
2072
- this.subscription.add(stream.fromEvent(document, 'copy').subscribe(ev => {
2073
+ this.subscription.add(stream.fromEvent(isFirefox() ? textarea : document, 'copy').subscribe(ev => {
2073
2074
  const selection = this.selection;
2074
2075
  if (!selection.isSelected) {
2075
2076
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/platform-browser",
3
- "version": "3.7.2",
3
+ "version": "3.7.4",
4
4
  "description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -48,5 +48,5 @@
48
48
  "bugs": {
49
49
  "url": "https://github.com/textbus/textbus.git/issues"
50
50
  },
51
- "gitHead": "0fafe249121abf8bd86abd956edc7ee298d84636"
51
+ "gitHead": "64e7eccb51f7f9c452b91d4fc5e0fe1d6c37c2f0"
52
52
  }