intercept events from layer when it's opened