uni-virtualizer
uni-virtualizer copied to clipboard
rangechange event properties are undefined in Safari
Hi there,
I was testing out lit-virtualizer and found a bit of a weird behavior in Safari (both MacOS and iOS)
When listening to the rangechange event, and trying to access to it's properties like this
virtualizer.addEventListener('rangechange',
({first, last, firstVisible, lastVisible}) => {
console.log(first, last, firstVisible, lastVisible);
});
In Chrome everything works fine, but in Safari they are all undefined
I can access them in both Chrome and Safari as _first, _last etc., but I don't think that's how they're intended to be used
Affected Version
lit-virtualizer 0.3.0
Affected Browsers
- iOS Safari 12.4
- MacOS Safari 12.1.2
How to reproduce
- Add a lit-virtualizer component and listen to the
rangechangeevent - Try to access the
first,last,firstVisible, orlastVisibleproperties of the event
Workaround
- Use the
_first,_last,_firstVisible, and_lastVisibleproperties
Screenshots
Safari Console
Chrome Console
