Fixes bug with the text selection object and firefox