[BUG #8703] Change to getLocation because we need the position relative to document
Remove commented out function