Potential fix for Firefox sometimes losing the text selection