Fix text selection bug in firefox.