2 ms·
Instead of using capturing you could also just trigger another mousedown event which will be seen by the sortable plugin. This has the advantage of working even
by pilif 15y ago
Instead of using capturing you could also just trigger another mousedown event which will be seen by the sortable plugin. This has the advantage of working even in old IEs.
Be mindful though that by deferring the setup of the sortable list until the mouse action, you will introduce UI lag to the user. Sure: The page might load a bit faster, but now users clicking on the sortable elements will have to wait longer for their click to register.
As an aside, it's ironic that as usual, the browsers which would profit the most from these kinds of speed optimizations don't support them to begin with.
It's also always the slowest browsers that require the polyfills with the worst performance characteristics.