I have a unique challenge in this code where I want the user to grab the black square and rotate it around the inner circle.
Check out the code snippet here.
While attempting to rotate the square, you might notice that the cursor sometimes gets stuck in Firefox. This prevents the $(document).off('mousemove');
from executing unless you click again to trigger the mouseup
event handler.
This issue seems to be specific to Firefox as IE, Chrome, and Safari are working fine (although Chrome crashes if you rapidly click on the black square).
Is there a way to enhance this code to prevent the cursor from getting stuck in Firefox?
NOTE: If you're struggling to replicate the stuck cursor issue, try clicking and holding one of the bottom corners of the black box without moving it, then quickly move your cursor left to right.