#11746 issue. Fix resize bug pulled right tip

Fix the problem with tooltip pulled right side. 
Added checking offset on the bug side

Issue: https://github.com/twbs/bootstrap/issues/11746