Fixed #5635: Correction of mouse event's cursor position