@cocreate/cursors 1.11.8 → 1.11.12

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 CHANGED
@@ -1,3 +1,31 @@
1
+ ## [1.11.12](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.11...v1.11.12) (2022-02-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bump dependency versions ([1073145](https://github.com/CoCreate-app/CoCreate-cursors/commit/10731454dffcca44e36af1c167d5b47f189ad025))
7
+
8
+ ## [1.11.11](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.10...v1.11.11) (2022-02-03)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * replaced show and hide class hidden with attribute hidden ([c93182d](https://github.com/CoCreate-app/CoCreate-cursors/commit/c93182d850410c9ad3aea6b133f2df56e5694769))
14
+
15
+ ## [1.11.10](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.9...v1.11.10) (2022-02-01)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * update dependency versions ([21eb6ef](https://github.com/CoCreate-app/CoCreate-cursors/commit/21eb6ef01911e8128274285c11e7673b5ec8ccd3))
21
+
22
+ ## [1.11.9](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.8...v1.11.9) (2022-01-15)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * cursor was not displaying on inputs ([d608657](https://github.com/CoCreate-app/CoCreate-cursors/commit/d608657598178c16bae66b715f1b79fc4610b1c1))
28
+
1
29
  ## [1.11.8](https://github.com/CoCreate-app/CoCreate-cursors/compare/v1.11.7...v1.11.8) (2022-01-13)
2
30
 
3
31
 
package/docs/index.html CHANGED
@@ -80,7 +80,7 @@
80
80
  <div class="container svColumn overflow:hidden card position:relative border-radius:2px width:auto height:100%" id="sandbox">
81
81
  <div class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
82
82
  <a class="margin-right:10px" id="code" show="#preview" hide="#code, #view"><i class="far fa-eye"></i></a>
83
- <a class="margin-right:10px hidden" id="preview" show="#code, #view" hide="#preview"><i class="fas fa-code"></i></a>
83
+ <a class="margin-right:10px" id="preview" show="#code, #view" hide="#preview" hidden><i class="fas fa-code"></i></a>
84
84
  <a class="margin-right:5px" fullscreen target="#playground"><i class="fas fa-expand"></i></a>
85
85
  </div>
86
86
  <div class="svRow">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/cursors",
3
- "version": "1.11.8",
3
+ "version": "1.11.12",
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.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"
65
+ "@cocreate/crud-client": "^1.4.45",
66
+ "@cocreate/docs": "^1.2.67",
67
+ "@cocreate/message-client": "^1.1.62",
68
+ "@cocreate/observer": "^1.4.2",
69
+ "@cocreate/random-color": "^1.2.19",
70
+ "@cocreate/selection": "^1.4.2",
71
+ "@cocreate/uuid": "^1.1.57"
72
72
  }
73
73
  }
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;