Solid PointerEvents, Firefox, RequestAnimationFrame and OffsetX/Y

Here's one that took up a bit of my afternoon after I wrote a RAF debouncer. Does Solid 'do' anything with events, like React does, or are they simply browser events? If you do an addEventListener on an element for pointermove, and place these in the handler:
requestAnimationFrame(() => {
console.log(`event RAF`, event.offsetX, event.offsetY);
});

console.log(`event`, event.offsetX, event.offsetY);
requestAnimationFrame(() => {
console.log(`event RAF`, event.offsetX, event.offsetY);
});

console.log(`event`, event.offsetX, event.offsetY);
In Firefox you'll get
19:33:46.808 event RAF 0 0
19:33:46.824 event 1035 164
19:33:46.826 event RAF 0 0
19:33:46.840 event 1039 154
19:33:46.841 event RAF 0 0
19:33:46.808 event RAF 0 0
19:33:46.824 event 1035 164
19:33:46.826 event RAF 0 0
19:33:46.840 event 1039 154
19:33:46.841 event RAF 0 0
in all other browsers, you'll get what you'd expect.
event RAF – 815 – 1064
event RAF – 808 – 1089
event – 802 – 1124
event – 791 – 1182
event RAF – 802 – 1124
event RAF – 791 – 1182
event RAF – 815 – 1064
event RAF – 808 – 1089
event – 802 – 1124
event – 791 – 1182
event RAF – 802 – 1124
event RAF – 791 – 1182
Is this a Firefox bug, or could it possibly be something solid is doing
2 Replies
lxsmnsyc
lxsmnsyc2y ago
most likely a Firefox bug
Some Call Me Tim
Some Call Me TimOP2y ago
k, that's what I thought. Just checking, thanks.
Want results from more Discord servers?
Add your server