From 2c9963ae232ebca52721d22cdfb054543b3e167e Mon Sep 17 00:00:00 2001 From: Thorin-Oakenpants Date: Sat, 19 Oct 2024 07:29:32 +0000 Subject: [PATCH] tweak touch data --- tests/pointerevent.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/pointerevent.html b/tests/pointerevent.html index c24872da..4786331e 100644 --- a/tests/pointerevent.html +++ b/tests/pointerevent.html @@ -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