touch: assign touch properties to previousTouch object to avoid modification (safari seems to reuse the same object and ends up writing in previousTouch when creating a new touch event) (issue #78)
This commit is contained in:
parent
74fbd52c37
commit
777ae6370b
2 changed files with 35 additions and 2 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -1,5 +1,16 @@
|
|||
# Changelog
|
||||
|
||||
## next
|
||||
|
||||
- bug fixes
|
||||
- touch release event is properly dispatched in traversing containers (ie keyboards and matrices) (#94)
|
||||
- iOS / Safari compatibility improved
|
||||
- widgets
|
||||
- css `border-radius` support enhanced
|
||||
- css `color` applies locally while `--color-text` applies to children too
|
||||
- packaging
|
||||
- added `arm64` binaries
|
||||
|
||||
## 0.19.6
|
||||
|
||||
- hot fix
|
||||
|
|
|
|||
|
|
@ -143,7 +143,18 @@
|
|||
}
|
||||
|
||||
targets[id] = $(touch.target)
|
||||
previousTouches[id] = touch
|
||||
previousTouches[id] = {
|
||||
deltaX:touch.deltaX,
|
||||
deltaY:touch.deltaY,
|
||||
offsetX:touch.offsetX,
|
||||
offsetY:touch.offsetY,
|
||||
speedX:touch.speedX,
|
||||
speedY:touch.speedY,
|
||||
pageX:touch.pageX,
|
||||
pageY:touch.pageY,
|
||||
clientX:touch.clientX,
|
||||
clientY:touch.clientY
|
||||
}
|
||||
|
||||
touch.speedX = 0
|
||||
touch.speedY = 0
|
||||
|
|
@ -218,7 +229,18 @@
|
|||
|
||||
}
|
||||
|
||||
previousTouches[id] = touch
|
||||
previousTouches[id] = {
|
||||
deltaX:touch.deltaX,
|
||||
deltaY:touch.deltaY,
|
||||
offsetX:touch.offsetX,
|
||||
offsetY:touch.offsetY,
|
||||
speedX:touch.speedX,
|
||||
speedY:touch.speedY,
|
||||
pageX:touch.pageX,
|
||||
pageY:touch.pageY,
|
||||
clientX:touch.clientX,
|
||||
clientY:touch.clientY
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue