bitovi / syn

Standalone Synthetic Event Library
https://www.npmjs.com/package/syn
MIT License
444 stars 258 forks source link

.drag() on an element outside the viewport does not work #164

Open justinbmeyer opened 6 years ago

justinbmeyer commented 6 years ago

If you do .drag() on an element outside the viewport, it does not work. This is because https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementFromPoint does not work outside the viewport.

I think we should detect this and throw an error (or warning) letting people know.

It's possible we could scroll to to make this work for locations that are not negative.