reinitialise rootAttributes on reload
Added additional checks for UITextSelectionRect hyperlink detection. There are instances where the hyperlink was at the end of a text block and would get detected erroneously.