Skip to content

Commit

Permalink
tweak touch data
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorin-Oakenpants authored Oct 19, 2024
1 parent 8e6e22d commit 2c9963a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/pointerevent.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,17 @@
} else if (Number.isNaN(value)) {
value = 'NaN'
}
oTemp[input][type][k] = value
} catch(e) {
value = e.name
// touchcancel and touchend don't have values except for force
// so don't record them if we catch a TypeError
// this means we can now properly compare valid matches in screen/client X/Y
if (e.name == 'TypeError' && k !== 'force') {
// record nothing
} else {
oTemp[input][type][k] = e.name
}
}
oTemp[input][type][k] = value
})

// display when we have all events
Expand Down

0 comments on commit 2c9963a

Please sign in to comment.