Fix for Firefox error when calling 'setSelectionRange' on hidden elements

Simple as it sounds. 

Firefox explodes when trying to change the caret's position if the element is hidden.

This is a simple fix.