fix selection problem in html5 canvas