apvarun / toastify-js

Pure JavaScript library for better notification messages
https://apvarun.github.io/toastify-js/
MIT License
2.13k stars 231 forks source link

timeOutValue is only available on divElement #24

Closed gavinhungry closed 5 years ago

gavinhungry commented 5 years ago

In the block for stopOnFocus, the mouseover handler tries to clearTimeout on event.target.timeOutValue (it assumes that event.target is divElement).

When hovering a child element though, event.target may not be what is expected, and event.target.timeOutValue will be undefined.

Instead, use divElement.timeOutValue explicitly.

apvarun commented 5 years ago

Good catch! Having nested elements would've caused inconsistencies. Merging now.