@cocreate/cursors 1.11.8 → 1.11.9
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 +7 -0
- package/package.json +1 -1
- package/src/index.js +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.11.9](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.8...v1.11.9) (2022-01-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* cursor was not displaying on inputs ([d608657](https://github.com/CoCreate-app/CoCreate-cursors/commit/d608657598178c16bae66b715f1b79fc4610b1c1))
|
|
7
|
+
|
|
1
8
|
## [1.11.8](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.7...v1.11.8) (2022-01-13)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -62,14 +62,14 @@ function drawCursors(selection) {
|
|
|
62
62
|
// element.activeElement = '';
|
|
63
63
|
continue;
|
|
64
64
|
}
|
|
65
|
-
if (element.tagName != 'INPUT' || element.tagName != 'TEXTAREA'){
|
|
66
|
-
if (!element.hasAttribute('contenteditable') && element.getAttribute('cursors') != 'true') {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
65
|
let realtime = element.getAttribute('realtime');
|
|
71
66
|
let cursors = element.getAttribute('cursors');
|
|
67
|
+
let contenteditable = element.getAttribute('contenteditable');
|
|
72
68
|
if (realtime == 'false' || cursors == 'false') continue;
|
|
69
|
+
if (element.tagName != 'INPUT' && element.tagName != 'TEXTAREA')
|
|
70
|
+
if (contenteditable == 'false' || contenteditable == null)
|
|
71
|
+
if (cursors != 'true') continue;
|
|
72
|
+
|
|
73
73
|
if (element.hasAttribute('contenteditable')) {
|
|
74
74
|
let domTextEditor = element;
|
|
75
75
|
if (element.tagName == 'IFRAME'){
|
|
@@ -89,6 +89,7 @@ function drawCursors(selection) {
|
|
|
89
89
|
start = pos.start;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
+
|
|
92
93
|
if(!element) continue;
|
|
93
94
|
let document = element.ownerDocument;
|
|
94
95
|
let mirrorDiv;
|