dmn-js-shared
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -139,3 +139,2 @@ import { Component } from 'inferno'; | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
@@ -146,2 +145,4 @@ if (this.props.ctrlForNewline && !isCmd(event)) { | ||
event.stopPropagation(); | ||
insertLineBreak(); | ||
@@ -148,0 +149,0 @@ |
{ | ||
"name": "dmn-js-shared", | ||
"description": "Shared components used by dmn-js", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "test": "karma start", |
@@ -1,3 +0,11 @@ | ||
import { query as domQuery } from 'min-dom'; | ||
import { | ||
query as domQuery | ||
} from 'min-dom'; | ||
import { | ||
assign, | ||
isObject | ||
} from 'min-dash'; | ||
export function triggerInputEvent(element, text) { | ||
@@ -15,7 +23,7 @@ if (element.tagName === 'INPUT') { | ||
element.dispatchEvent(event); | ||
return element.dispatchEvent(event); | ||
} | ||
export function triggerClick(el, clientX, clientY, ctrlKey) { | ||
triggerMouseEvent(el, 'click', clientX, clientY, ctrlKey); | ||
return triggerMouseEvent(el, 'click', clientX, clientY, ctrlKey); | ||
} | ||
@@ -34,3 +42,3 @@ | ||
element.dispatchEvent(e); | ||
return element.dispatchEvent(e); | ||
} | ||
@@ -56,3 +64,3 @@ | ||
export function triggerKeyEvent(element, event, code) { | ||
export function triggerKeyEvent(element, event, optionsOrCode) { | ||
const e = document.createEvent('Events'); | ||
@@ -62,6 +70,10 @@ | ||
e.keyCode = code; | ||
e.which = code; | ||
if (isObject(optionsOrCode)) { | ||
assign(e, optionsOrCode); | ||
} else { | ||
e.keyCode = optionsOrCode; | ||
e.which = optionsOrCode; | ||
} | ||
element.dispatchEvent(e); | ||
return element.dispatchEvent(e); | ||
} | ||
@@ -74,3 +86,3 @@ | ||
triggerClick(option); | ||
return triggerClick(option); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64018
2330