I'm trying to customize the behavior of the cursor. Now it works next way: on mousemove I use:
scheme.setAttribute("cursor", "move");
onmmouse up:
scheme.setAttribute("cursor", "auto");
In this case:
scheme.setAttribute("cursor", "-moz-grab");
scheme.setAttribute("cursor", "-webkit-grab");
the cursor only works for -webkit(Chrome).
While this case
scheme.setAttribute("cursor", "-webkit-grab");
scheme.setAttribute("cursor", "-moz-grab");
the cursor only works for -moz(FF).
The following structure hasn't worked as I expected:
scheme.setAttribute("cursor", "-moz-grab, -webkit-grab");
This works:
scheme.setAttribute("style", "cursor:-moz-grab; cursor:-webkit-grab;");
In both browsers, but I read here that it's bad practice.
The code here works but I need to use a structure like this and that.
Something like this (that structure doesn't work now).
Edit 1
From this other Stack Overflow post:
solution using:
scheme.setAttribute("cursor", "url(http://www.google.com/intl/en_ALL/mapfiles/openhand.cur) 4 4, move");
works in both browsers, but still needed a solution using -moz-grab
and -webkit-grab
values.
And it does not seem to work in IE (I expect to see second, reserve move icon)
Edit 2
Clearer, mousedown/mouseup example:
Case 1: (works only Chrome)
Case 2: (here there are no changes on mousedown)