JSFiddle - React, Tailwind, and code Playground
HTML
<div id="grab">
<p>Click gray area (get focus in jsfiddle) and hold shift.</p>
<p>A grab icon will appear while holding shift.</p>
<p>Upon releasing shift, the icon should return normal.</p>
<p>The icon does not return normal in Linux Firefox v.22</p>
<p>Works correctly in other browsers, including Windows Firefox v.22</p>
</div>
CSS
#grab {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: gray;
margin: 5px;
}
JavaScript
/*
* Executes a function when a key is pressed,
* and another function when the key is released.
*/
var handler = function (e) {
if (e.shiftKey && e.keyCode == 16) {
$("#grab").css('cursor', 'move');
} else {
$("#grab").css('cursor', 'auto');
}
};
$(document).keydown(handler);
$(document).keyup(handler);