Comparing version 19.0.0 to 20.0.0
# CHANGELOG | ||
## 20.0.0 | ||
Click and DblClick events are not listened in Capture phase which increase compatibility with web components. | ||
New method `addEventListeners` needs to be called when using Bobril nodes in 3rd party library which prevents bubbling of various browser events. You will want to usually call together with `addRoot`. | ||
## 19.0.0 | ||
@@ -4,0 +9,0 @@ |
{ | ||
"name": "bobril", | ||
"version": "19.0.0", | ||
"version": "20.0.0", | ||
"description": "Component Oriented MVC Framework with virtual DOM and CSS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -492,3 +492,3 @@ import { | ||
var bustingEventNames = ["!PointerDown", "!PointerMove", "!PointerUp", "!PointerCancel", "^click"] as const; | ||
var bustingEventNames = ["!PointerDown", "!PointerMove", "!PointerUp", "!PointerCancel", "click"] as const; | ||
var bustingEventHandlers = [ | ||
@@ -564,7 +564,6 @@ bustingPointerDown, | ||
// click must have higher priority over onchange detection | ||
addEvent5("^click", createHandler(onClickText)); | ||
addEvent5("^dblclick", createHandler(onDoubleClickText)); | ||
addEvent5("click", createHandler(onClickText)); | ||
addEvent5("dblclick", createHandler(onDoubleClickText)); | ||
addEvent5("contextmenu", createHandler("onContextMenu", true)); | ||
let wheelSupport = ("onwheel" in document.createElement("div") ? "" : "mouse") + "wheel"; | ||
function handleMouseWheel(ev: any, _target: Node | undefined, node: IBobrilCacheNode | undefined): boolean { | ||
@@ -580,11 +579,4 @@ let button = ev.button + 1; | ||
} | ||
let dx = 0, | ||
dy: number; | ||
if (wheelSupport == "mousewheel") { | ||
dy = (-1 / 40) * ev.wheelDelta; | ||
ev.wheelDeltaX && (dx = (-1 / 40) * ev.wheelDeltaX); | ||
} else { | ||
dx = ev.deltaX; | ||
dy = ev.deltaY; | ||
} | ||
let dx = ev.deltaX; | ||
let dy = ev.deltaY; | ||
var param: IBobrilMouseWheelEvent = { | ||
@@ -610,3 +602,3 @@ target: node!, | ||
} | ||
addEvent5(wheelSupport, handleMouseWheel); | ||
addEvent5("wheel", handleMouseWheel); | ||
@@ -613,0 +605,0 @@ export const pointersDownCount = () => Object.keys(pointersDown).length; |
Sorry, the diff of this file is too big to display
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
388979
9258