add full width check to the getChildByOffset + refactoring