google/blockly — pull request #5 by bioball (2014-10-20 21:27:51+00:00)
Title: add checks for lack of event.clientX or event.clientY in onMouseDown_, and use requestAnimationFrame instead of setTimeout for animations

requestAnimationFrame is a better API to use than setTimeout for animations like this, as browsers call this function when it is ready for the next repaint in its event loop.

https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame

This would need a polyfill to work with older browsers, but I'm not sure where to stick that in the blockly codebase. I would use this polyfill: https://gist.github.com/paulirish/1579671

Also, I noticed that two finger drag events on my iPad didn't report event.clientX or event.clientY, causing a lot of errors to occur when doing two finger drags.