don't let right side of tooltip outside document.width