Previously it used to use cursor location from time when panel was drawn, which in some cases lead to using previous cursor location instead of current.