Ignoring pointer while outside of document [Bugfix]