@textbus/platform-browser 4.3.0 → 4.3.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.
@@ -1303,8 +1303,9 @@ let MagicInput = class MagicInput extends Input {
1303
1303
  }
1304
1304
  }), fromEvent(textarea, 'paste').subscribe(ev => {
1305
1305
  const text = ev.clipboardData.getData('Text');
1306
+ const types = Array.from(ev.clipboardData.types || []);
1306
1307
  const files = Array.from(ev.clipboardData.files);
1307
- if (files.length) {
1308
+ if (types.every(type => type === 'Files') && files.length) {
1308
1309
  Promise.all(files.filter(i => {
1309
1310
  return /image/i.test(i.type);
1310
1311
  }).map(item => {
@@ -1905,8 +1906,9 @@ let NativeInput = class NativeInput extends Input {
1905
1906
  }
1906
1907
  }), fromEvent(textarea, 'paste').subscribe(ev => {
1907
1908
  const text = ev.clipboardData.getData('Text');
1909
+ const types = Array.from(ev.clipboardData.types || []);
1908
1910
  const files = Array.from(ev.clipboardData.files);
1909
- if (files.length) {
1911
+ if (types.every(type => type === 'Files') && files.length) {
1910
1912
  Promise.all(files.filter(i => {
1911
1913
  return /image/i.test(i.type);
1912
1914
  }).map(item => {
package/bundles/index.js CHANGED
@@ -1305,8 +1305,9 @@ exports.MagicInput = class MagicInput extends Input {
1305
1305
  }
1306
1306
  }), stream.fromEvent(textarea, 'paste').subscribe(ev => {
1307
1307
  const text = ev.clipboardData.getData('Text');
1308
+ const types = Array.from(ev.clipboardData.types || []);
1308
1309
  const files = Array.from(ev.clipboardData.files);
1309
- if (files.length) {
1310
+ if (types.every(type => type === 'Files') && files.length) {
1310
1311
  Promise.all(files.filter(i => {
1311
1312
  return /image/i.test(i.type);
1312
1313
  }).map(item => {
@@ -1907,8 +1908,9 @@ exports.NativeInput = class NativeInput extends Input {
1907
1908
  }
1908
1909
  }), stream.fromEvent(textarea, 'paste').subscribe(ev => {
1909
1910
  const text = ev.clipboardData.getData('Text');
1911
+ const types = Array.from(ev.clipboardData.types || []);
1910
1912
  const files = Array.from(ev.clipboardData.files);
1911
- if (files.length) {
1913
+ if (types.every(type => type === 'Files') && files.length) {
1912
1914
  Promise.all(files.filter(i => {
1913
1915
  return /image/i.test(i.type);
1914
1916
  }).map(item => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/platform-browser",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
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",
@@ -26,8 +26,8 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@tanbo/stream": "^1.2.6",
29
- "@textbus/core": "^4.3.0",
30
- "@viewfly/core": "^1.1.0"
29
+ "@textbus/core": "^4.3.1",
30
+ "@viewfly/core": "^1.1.2"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@rollup/plugin-commonjs": "^23.0.2",
@@ -47,5 +47,5 @@
47
47
  "bugs": {
48
48
  "url": "https://github.com/textbus/textbus.git/issues"
49
49
  },
50
- "gitHead": "cf4fd289b73bc777124a32fe42bb58eba05a34f1"
50
+ "gitHead": "83f0f0468c1be5523154d5896122be7a15d7b7f7"
51
51
  }