Fixed NS_ERROR_FAILURE in Firefox related to code.showCode()

Invoking setSelectionRange() on a <textarea> contained in a hidden element (display: none) will invoke NS_ERROR_FAILURE without any further error message. This is an attempt to work around by code.showCode() which is unaware of this fact.