@cocreate/text 1.16.4 → 1.16.5

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,10 @@
1
+ ## [1.16.5](https://github.com/CoCreate-app/CoCreate-text/compare/v1.16.4...v1.16.5) (2022-06-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * ifactiveElement inputEvent skip = false ([0b61519](https://github.com/CoCreate-app/CoCreate-text/commit/0b61519e2bd9592502ebb7a2ba88b71a16e11e55))
7
+
1
8
  ## [1.16.4](https://github.com/CoCreate-app/CoCreate-text/compare/v1.16.3...v1.16.4) (2022-06-18)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/text",
3
- "version": "1.16.4",
3
+ "version": "1.16.5",
4
4
  "description": "A simple text component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "text",
package/src/index.js CHANGED
@@ -359,6 +359,9 @@ function _updateElementText (element, value, start, end) {
359
359
 
360
360
  export function _dispatchInputEvent(element, content, start, end, prev_start, prev_end) {
361
361
  let detail = {value: content, start, end, prev_start, prev_end, skip: true};
362
+ let activeElement = element.ownerDocument.activeElement;
363
+ if (activeElement == element)
364
+ detail.skip = false;
362
365
  if (eventObj) {
363
366
  let event = new CustomEvent(eventObj.type, { bubbles: true });
364
367
  Object.defineProperty(event, 'stopCCText', { writable: false, value: true });