check canvas exists before setting cursor
tests
closure fix