Change mousemove events handling, fix text selection bug

[#61391348]