making events work only on canvas space