@textbus/platform-browser 3.7.9 → 3.8.0
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/bundles/index.esm.js +22 -4
- package/bundles/index.js +22 -4
- package/package.json +3 -3
package/bundles/index.esm.js
CHANGED
@@ -1463,7 +1463,10 @@ class ExperimentalCaret {
|
|
1463
1463
|
refresh(isFixedCaret = false) {
|
1464
1464
|
this.isFixed = isFixedCaret;
|
1465
1465
|
if (this.oldRange) {
|
1466
|
-
|
1466
|
+
const range = document.createRange();
|
1467
|
+
range.setStart(this.oldRange.startContainer, this.oldRange.startOffset);
|
1468
|
+
range.setEnd(this.oldRange.endContainer, this.oldRange.endOffset);
|
1469
|
+
this.show(range, false);
|
1467
1470
|
}
|
1468
1471
|
this.isFixed = false;
|
1469
1472
|
}
|
@@ -1474,7 +1477,12 @@ class ExperimentalCaret {
|
|
1474
1477
|
left: oldRect.left,
|
1475
1478
|
height: oldRect.height
|
1476
1479
|
};
|
1477
|
-
this.oldRange =
|
1480
|
+
this.oldRange = {
|
1481
|
+
startContainer: range.startContainer,
|
1482
|
+
endContainer: range.endContainer,
|
1483
|
+
startOffset: range.startOffset,
|
1484
|
+
endOffset: range.endOffset
|
1485
|
+
};
|
1478
1486
|
if (restart || this.scheduler.lastChangesHasLocalUpdate) {
|
1479
1487
|
clearTimeout(this.timer);
|
1480
1488
|
}
|
@@ -1823,7 +1831,12 @@ let MagicInput = class MagicInput extends Input {
|
|
1823
1831
|
key: key,
|
1824
1832
|
altKey: ev.altKey,
|
1825
1833
|
shiftKey: ev.shiftKey,
|
1826
|
-
ctrlKey: this.isMac ? ev.metaKey : ev.ctrlKey
|
1834
|
+
ctrlKey: this.isMac ? ev.metaKey : ev.ctrlKey,
|
1835
|
+
agent: {
|
1836
|
+
key: ev.key,
|
1837
|
+
code: ev.code,
|
1838
|
+
keyCode: ev.keyCode,
|
1839
|
+
}
|
1827
1840
|
});
|
1828
1841
|
if (is) {
|
1829
1842
|
this.ignoreComposition = true;
|
@@ -2201,7 +2214,12 @@ let NativeInput = class NativeInput extends Input {
|
|
2201
2214
|
key: key,
|
2202
2215
|
altKey: ev.altKey,
|
2203
2216
|
shiftKey: ev.shiftKey,
|
2204
|
-
ctrlKey: this.isMac ? ev.metaKey : ev.ctrlKey
|
2217
|
+
ctrlKey: this.isMac ? ev.metaKey : ev.ctrlKey,
|
2218
|
+
agent: {
|
2219
|
+
key: ev.key,
|
2220
|
+
keyCode: ev.keyCode,
|
2221
|
+
code: ev.code
|
2222
|
+
}
|
2205
2223
|
});
|
2206
2224
|
if (is) {
|
2207
2225
|
this.ignoreComposition = true;
|
package/bundles/index.js
CHANGED
@@ -1465,7 +1465,10 @@ class ExperimentalCaret {
|
|
1465
1465
|
refresh(isFixedCaret = false) {
|
1466
1466
|
this.isFixed = isFixedCaret;
|
1467
1467
|
if (this.oldRange) {
|
1468
|
-
|
1468
|
+
const range = document.createRange();
|
1469
|
+
range.setStart(this.oldRange.startContainer, this.oldRange.startOffset);
|
1470
|
+
range.setEnd(this.oldRange.endContainer, this.oldRange.endOffset);
|
1471
|
+
this.show(range, false);
|
1469
1472
|
}
|
1470
1473
|
this.isFixed = false;
|
1471
1474
|
}
|
@@ -1476,7 +1479,12 @@ class ExperimentalCaret {
|
|
1476
1479
|
left: oldRect.left,
|
1477
1480
|
height: oldRect.height
|
1478
1481
|
};
|
1479
|
-
this.oldRange =
|
1482
|
+
this.oldRange = {
|
1483
|
+
startContainer: range.startContainer,
|
1484
|
+
endContainer: range.endContainer,
|
1485
|
+
startOffset: range.startOffset,
|
1486
|
+
endOffset: range.endOffset
|
1487
|
+
};
|
1480
1488
|
if (restart || this.scheduler.lastChangesHasLocalUpdate) {
|
1481
1489
|
clearTimeout(this.timer);
|
1482
1490
|
}
|
@@ -1825,7 +1833,12 @@ exports.MagicInput = class MagicInput extends Input {
|
|
1825
1833
|
key: key,
|
1826
1834
|
altKey: ev.altKey,
|
1827
1835
|
shiftKey: ev.shiftKey,
|
1828
|
-
ctrlKey: this.isMac ? ev.metaKey : ev.ctrlKey
|
1836
|
+
ctrlKey: this.isMac ? ev.metaKey : ev.ctrlKey,
|
1837
|
+
agent: {
|
1838
|
+
key: ev.key,
|
1839
|
+
code: ev.code,
|
1840
|
+
keyCode: ev.keyCode,
|
1841
|
+
}
|
1829
1842
|
});
|
1830
1843
|
if (is) {
|
1831
1844
|
this.ignoreComposition = true;
|
@@ -2203,7 +2216,12 @@ exports.NativeInput = class NativeInput extends Input {
|
|
2203
2216
|
key: key,
|
2204
2217
|
altKey: ev.altKey,
|
2205
2218
|
shiftKey: ev.shiftKey,
|
2206
|
-
ctrlKey: this.isMac ? ev.metaKey : ev.ctrlKey
|
2219
|
+
ctrlKey: this.isMac ? ev.metaKey : ev.ctrlKey,
|
2220
|
+
agent: {
|
2221
|
+
key: ev.key,
|
2222
|
+
keyCode: ev.keyCode,
|
2223
|
+
code: ev.code
|
2224
|
+
}
|
2207
2225
|
});
|
2208
2226
|
if (is) {
|
2209
2227
|
this.ignoreComposition = true;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/platform-browser",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.8.0",
|
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",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"dependencies": {
|
28
28
|
"@tanbo/di": "^1.1.8",
|
29
29
|
"@tanbo/stream": "^1.2.5",
|
30
|
-
"@textbus/core": "^3.
|
30
|
+
"@textbus/core": "^3.8.0",
|
31
31
|
"reflect-metadata": "^0.1.13"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"bugs": {
|
49
49
|
"url": "https://github.com/textbus/textbus.git/issues"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "cf4fd289b73bc777124a32fe42bb58eba05a34f1"
|
52
52
|
}
|