The search functionality needs JavaScript enabled
when range positions is out of content bounds, fix it to nearest valid position
void correctRange( ref TextRange range );