fix wheel validate() handling

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
Victor Seiji Hariki 2022-12-27 17:59:45 -03:00
parent 84ba327706
commit a47fc3ee25

View file

@ -447,7 +447,7 @@ window.addEventListener(
_discard = evn.deltaMode;
mouse._contexts.forEach(({name, target, validate}) => {
if (!target || (target === evn.target && (!validate || validate(evn)))) {
if ((!target || target === evn.target) && (!validate || validate(evn))) {
mouse.listen[name].onwheel.emit({
target: evn.target,
delta: evn.deltaY,