@cocreate/cursors 1.11.2 → 1.11.6
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/CHANGELOG.md +28 -0
- package/docs/index.html +1 -1
- package/package.json +8 -8
- package/src/index.js +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [1.11.6](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.5...v1.11.6) (2022-01-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* removed commented code ([6eabd19](https://github.com/CoCreate-app/CoCreate-cursors/commit/6eabd1955963b44ba6db6259f0a492ddfe2cd54a))
|
|
7
|
+
|
|
8
|
+
## [1.11.5](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.4...v1.11.5) (2022-01-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* if parent position is static add relative to contain cursor-container ([76f23c1](https://github.com/CoCreate-app/CoCreate-cursors/commit/76f23c1520fdc270f325885332ccf67bab6787ed))
|
|
14
|
+
|
|
15
|
+
## [1.11.4](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.3...v1.11.4) (2022-01-01)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* get-value attribute value now supports a selector added # to all values currently in get-value attributes ([cd5d366](https://github.com/CoCreate-app/CoCreate-cursors/commit/cd5d366fee456b703644b5871654519c3cdd0750))
|
|
21
|
+
|
|
22
|
+
## [1.11.3](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.2...v1.11.3) (2021-12-23)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* if elementActive and clientId is self return ([170ee7a](https://github.com/CoCreate-app/CoCreate-cursors/commit/170ee7a233f32e4fda9010e1ae18b9328489c6ed))
|
|
28
|
+
|
|
1
29
|
## [1.11.2](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.1...v1.11.2) (2021-12-19)
|
|
2
30
|
|
|
3
31
|
|
package/docs/index.html
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
<div class="svSplitter svHorizontal"> </div>
|
|
94
94
|
|
|
95
95
|
<div class="svPanel">
|
|
96
|
-
<iframe get-value="demo" frameBorder="0" height="100%" width="100%" class="min-width:300px"></iframe>
|
|
96
|
+
<iframe get-value="#demo" frameBorder="0" height="100%" width="100%" class="min-width:300px"></iframe>
|
|
97
97
|
</div>
|
|
98
98
|
|
|
99
99
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/cursors",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.6",
|
|
4
4
|
"description": "Collaborative user cursor position for inputs, textarea's and contenteditable elements.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cursors",
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
"webpack-log": "^3.0.1"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@cocreate/crud-client": "^1.4.
|
|
66
|
-
"@cocreate/docs": "^1.2.
|
|
67
|
-
"@cocreate/message-client": "^1.1.
|
|
68
|
-
"@cocreate/observer": "^1.3.
|
|
69
|
-
"@cocreate/random-color": "^1.2.
|
|
70
|
-
"@cocreate/selection": "^1.3.
|
|
71
|
-
"@cocreate/uuid": "^1.1.
|
|
65
|
+
"@cocreate/crud-client": "^1.4.41",
|
|
66
|
+
"@cocreate/docs": "^1.2.63",
|
|
67
|
+
"@cocreate/message-client": "^1.1.59",
|
|
68
|
+
"@cocreate/observer": "^1.3.55",
|
|
69
|
+
"@cocreate/random-color": "^1.2.16",
|
|
70
|
+
"@cocreate/selection": "^1.3.2",
|
|
71
|
+
"@cocreate/uuid": "^1.1.52"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/src/index.js
CHANGED
|
@@ -58,8 +58,8 @@ function drawCursors(selection) {
|
|
|
58
58
|
elements = document.querySelectorAll(selector);
|
|
59
59
|
}
|
|
60
60
|
for (let element of elements) {
|
|
61
|
-
if (element.activeElement) {
|
|
62
|
-
element.activeElement = '';
|
|
61
|
+
if (element.activeElement && selection.clientId == clientId) {
|
|
62
|
+
// element.activeElement = '';
|
|
63
63
|
continue;
|
|
64
64
|
}
|
|
65
65
|
let realtime = element.getAttribute('realtime');
|
|
@@ -98,6 +98,12 @@ function drawCursors(selection) {
|
|
|
98
98
|
mirrorDiv.contentEditable = false;
|
|
99
99
|
mirrorDiv.element = element;
|
|
100
100
|
element.insertAdjacentElement('afterend', mirrorDiv);
|
|
101
|
+
let parent = element.parentElement;
|
|
102
|
+
let parentComputed = getComputedStyle(parent);
|
|
103
|
+
let parentStylePosition = parentComputed['position'];
|
|
104
|
+
if (parentStylePosition == 'static')
|
|
105
|
+
parent.style.position = 'relative';
|
|
106
|
+
|
|
101
107
|
_initEvents(element);
|
|
102
108
|
initDocument(document);
|
|
103
109
|
}
|