Chrome/V8 slow onmousemove() over certain elements Chrome/V8 slow onmousemove() over certain elements google-chrome google-chrome

Chrome/V8 slow onmousemove() over certain elements


I'm going to answer my own question, as I've found a solution:

Running this jQuery function on the box fixed the lag issue:

$.fn.disableSelection = function() {  return this.each(function() {    $(this).attr('unselectable', 'on')    .css({      '-moz-user-select':'none',      '-webkit-user-select':'none',      'user-select':'none',      '::selection':'none',    })    .each(function() {      this.onselectstart = function() { return false; };    });  });};


I see no lagging in my computer...

Anyway, perhaps you can try decreasing the frequency your event handler can be called by using something like underscore's throttle function